Class TemplateExtensions
このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。
Contains extension method for handling url templates.
Inheritance
Namespace: Stylelabs.M.Sdk.WebClient.Http
Assembly: Stylelabs.M.Sdk.WebClient.dll
Syntax
Methods
Bind(Link, IDictionary<String, String>)
Parses the link's template and applies the specified values to it.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Link | link |
The link to parse. |
| IDictionary<System.String, System.String> | values |
The values of the templatized parameters. |
Returns
| Type | Description |
|---|---|
| System.String |
The link's template with it's parameters replaced by the specified values. |
Bind(Link, Object)
Parses the link's template and applies the specified values to it.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Link | link |
The link to parse. |
| System.Object | values |
The values of the templatized parameters. |
Returns
| Type | Description |
|---|---|
| System.String |
The link's template with it's parameters replaced by the specified values. |
GetVariableValue(Link, Link, String)
Extracts the value of the specified variable from the link based on a given template.
Declaration
Parameters
Returns
| Type | Description |
|---|---|
| System.String |
The value of the variable or null if the variable could not be found. |
GetVariableValue(Uri, Link, String)
Extracts the value of the specified variable from the uri based on a given template.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | uri |
The uri to extract the variable from. |
| Link | template |
The template that defines the variables. |
| System.String | variable |
The name of the variable to extract. |
Returns
| Type | Description |
|---|---|
| System.String |
The value of the variable or null if the variable could not be found. |