Partager via


UriTemplate.BindByName Method (Uri, IDictionary<String, String>)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Creates a new URI from the template and the collection of parameters.

Namespace:  System
Assembly:  System.ServiceModel.Web.Extensions (in System.ServiceModel.Web.Extensions.dll)

Syntax

'Declaration
Public Function BindByName ( _
    baseAddress As Uri, _
    parameters As IDictionary(Of String, String) _
) As Uri
public Uri BindByName(
    Uri baseAddress,
    IDictionary<string, string> parameters
)

Parameters

Return Value

Type: System.Uri
A URI.

Remarks

The IDictionary<String, String> parameter contains a collection of parameter name and value pairs. The parameters are matched up against the variables within the template by a case-insensitive comparison.

NoteNote:

The name/value collection passed to this method must contain a key for every template variable. Extra name/value pairs that do not match template variables are appended to the query string of the final URI.

Security noteSecurity Note:

It is possible to pass in text within the name/value pairs that prevent the generated URI from matching the template that is used to generate it. Examples of such text includes: '/', '..', '*', '{', and '}'.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.