Creates the URL for the specified template and binds parameters.
Namespace: DocuWare.Services.Http.Client
Assembly: DocuWare.RestClient (in DocuWare.RestClient.dll) Version: Version 6.6
Syntax
C#
public static string CreateUrl( this IEnumerable<UriTemplateDescription> templates, string templateName, IEnumerable<KeyValuePair<string, Object>> parameters )
Parameters
- templates
- Type: System.Collections.GenericIEnumerableUriTemplateDescription
The templates. - templateName
- Type: SystemString
Name of the template. - parameters
- Type: System.Collections.GenericIEnumerableKeyValuePairString, Object
The parameters.
Return Value
Type: StringThe URL with bound parameters.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableUriTemplateDescription. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Exception | Condition |
---|---|
ArgumentException | The specified template '{0}' cannot be found.;templateName |
See Also