TTMSMCPResourceBuilder Class
Describes a resource through chained calls and hands over the finished entry.
API unit family: TMS.MCP.Resources
Inherits from: TPersistent
Syntax
TTMSMCPResourceBuilder = class(TPersistent)
Remarks
Each step returns the builder, so the calls can be chained and closed with the build step, which checks that the entry is complete. The builder holds the entry while it is being described and gives up ownership when it is built, so the finished entry has to be freed by the caller unless it is handed to a collection — and the builder itself still has to be freed either way. A builder that is released without being built frees the entry it was holding.
Methods
| Name | Description |
|---|---|
| AddIcon | Appends one icon descriptor to the icons published with the entry. |
| Build | Checks that the entry is complete and hands it over. |
| Description | Sets the text that tells a model what the entry holds and when to read it. |
| MimeType | Sets the media type published as a hint for the content. |
| Name | Sets the identifier the entry is listed under. |
| Reader | Sets the code that produces the content when the entry is read. |
| Title | Sets the display name a client shows for the entry. |
| URI | Publishes the entry at one fixed address. |
| URITemplate | Publishes the entry as a pattern covering a family of addresses. |