//------------------------------------------------------------------------------ // Uint: 例子/文本处理者 //------------------------------------------------------------------------------ unit texthandler; interface uses System.SysUtils, System.IOUtils, System.Classes, FireHttp.Utils, FireHttp.Types, FireHttp.Classes, FireHttp.HTML, FireHttp.JSON, FireHttp.Path, FireHttp.Log, FireHttp.Config; type example_texthandler = class(TTextHandler) private const __PathInfo = '/texthandler'; const __Description = ''; protected procedure Execute; override; procedure Cleanup; override; public constructor Create(AThread: TWorkerThread); override; destructor Destroy; override; end; implementation uses Application; { example_texthandler } procedure example_texthandler.Cleanup; begin inherited; end; constructor example_texthandler.Create(AThread: TWorkerThread); begin inherited Create(AThread); {$region '设置处理者'} MultiPathInfo.Add(__PathInfo); Description := __Description; {$endregion} end; destructor example_texthandler.Destroy; begin inherited; end; procedure example_texthandler.Execute; begin inherited; Document.Text := 'Hello World!'; end; initialization RegisterHandlerClass(example_texthandler); end.