TTMSMCPResourceAttribute Class
Marks a method as the reader of a resource.
API unit family: TMS.MCP.Attributes
Inherits from: TTMSMCPCustomAttribute
Implements: ITMSMCPResourceAttribute
Syntax
TTMSMCPResourceAttribute = class(TTMSMCPCustomAttribute, ITMSMCPResourceAttribute)
Remarks
The method takes the requested URI as its only parameter and returns the resource content. Combine it with a URI or a URI template, otherwise the declaration is skipped. Be aware of a current limitation: a method marked only as a resource is registered and listed, but is never invoked, because the generated reader resolves the method through the tool dispatcher and that lookup only accepts a method that also carries the tool attribute. Apply the tool attribute as well for the reader to actually run.