EMS.Services.IEMSApiDocumentService

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

IEMSApiDocumentService = interface

C++

__interface  INTERFACE_UUID("{DFA9EA93-4663-4579-A3A4-0426EA850F1A}") IEMSApiDocumentService  : public System::IInterface

プロパティ

種類 可視性 ソース ユニット
interface
class
public
EMS.Services.pas
EMS.Services.hpp
EMS.Services EMS.Services


説明

API ドキュメントをカスタマイズするためのサービス インターフェイス。

TEMSAPIDocumentService クラスは、IEMSAPIDocumentService methods への簡略化されたアクセスを提供します。

uses
  EMS.Services;
type
  TMyDocFilter = class(TInterfacedObject, IEMSApiDocumentFilter)
  protected
    function Apply(const AContext: TEndpointContext; const AResource: TEMSResource;
      const AAPIDocPath: TAPIDocPath): Boolean;
  end;
function TMyDocFilter.Apply(const AContext: TEndpointContext;
  const AResource: TEMSResource; const AAPIDocPath: TAPIDocPath): Boolean;
begin
  Result := AAPIDocPath.Path.StartsWith('/myapi');
end;
var
  LInd: Integer;
initialization
  TEMSAPIDocumentService.SetMetadata('My API', 'ver 1.0', 'My API for custom services');
  LInd := TEMSAPIDocumentService.AddFilter(TMyDocFilter.Create as IEMSApiDocumentFilter);
finalization
  TEMSAPIDocumentService.RemoveFilter(LInd);
end.


関連項目