/
UriTemplate.xml
744 lines (672 loc) · 45.6 KB
/
UriTemplate.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
<Type Name="UriTemplate" FullName="System.UriTemplate">
<TypeSignature Language="C#" Value="public class UriTemplate" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UriTemplate extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.UriTemplate" />
<TypeSignature Language="VB.NET" Value="Public Class UriTemplate" />
<TypeSignature Language="F#" Value="type UriTemplate = class" />
<TypeSignature Language="C++ CLI" Value="public ref class UriTemplate" />
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="System.ServiceModel.Web" FromVersion="4.0.0.0" To="System.ServiceModel" ToVersion="4.0.0.0" FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Runtime.CompilerServices.TypeForwardedFrom("System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.TypeForwardedFrom("System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>A class that represents a Uniform Resource Identifier (URI) template.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A URI template allows you to define a set of structurally similar URIs. Templates are composed of two parts, a path and a query. A path consists of a series of segments delimited by a slash (/). Each segment can have a literal value, a variable value (written within curly braces [{ }], constrained to match the contents of exactly one segment), or a wildcard (written as an asterisk [*], which matches "the rest of the path"), which must appear at the end of the path. The query expression can be omitted entirely. If present, it specifies an unordered series of name/value pairs. Elements of the query expression can be either literal pairs (?x=2) or variable pairs (?x={val}). Unpaired values are not permitted. The following examples show valid template strings:
- "weather/WA/Seattle"
- "weather/{state}/{city}"
- "weather/*"
- "weather/{state}/{city}?forecast=today
- "weather/{state}/{city}?forecast={day}
The preceding URI templates might be used for organizing weather reports. Segments enclosed in curly braces are variables, everything else is a literal. You can convert a <xref:System.UriTemplate> instance into a <xref:System.Uri> by replacing variables with actual values. For example, taking the template "weather/{state}/{city}" and putting in values for the variables "{state}" and "{city}" gives you "weather/WA/Seattle". Given a candidate URI, you can test whether it matches a given URI template by calling <xref:System.UriTemplate.Match%28System.Uri%2CSystem.Uri%29>. You can also use <xref:System.UriTemplate> instances to create a <xref:System.Uri> from a set of variable values by calling <xref:System.UriTemplate.BindByName%28System.Uri%2CSystem.Collections.Specialized.NameValueCollection%29> or <xref:System.UriTemplate.BindByPosition%28System.Uri%2CSystem.String%5B%5D%29>.
## Examples
The following code demonstrates how to create a <xref:System.UriTemplate> instance, and bind and match it to a candidate URI.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet0":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet0":::
]]></format>
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.UriTemplate" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UriTemplate (string template);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string template) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (template As String)" />
<MemberSignature Language="F#" Value="new UriTemplate : string -> UriTemplate" Usage="new System.UriTemplate template" />
<MemberSignature Language="C++ CLI" Value="public:
 UriTemplate(System::String ^ template);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="template" Type="System.String" />
</Parameters>
<Docs>
<param name="template">The template.</param>
<summary>Initializes a new instance of the <see cref="T:System.UriTemplate" /> class with the specified template string.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example shows how to call the constructor.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UriTemplate (string template, bool ignoreTrailingSlash);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string template, bool ignoreTrailingSlash) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.#ctor(System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (template As String, ignoreTrailingSlash As Boolean)" />
<MemberSignature Language="F#" Value="new UriTemplate : string * bool -> UriTemplate" Usage="new System.UriTemplate (template, ignoreTrailingSlash)" />
<MemberSignature Language="C++ CLI" Value="public:
 UriTemplate(System::String ^ template, bool ignoreTrailingSlash);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="template" Type="System.String" />
<Parameter Name="ignoreTrailingSlash" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="template">The template string.</param>
<param name="ignoreTrailingSlash">A value that specifies whether trailing slash "/" characters should be ignored.</param>
<summary>Initializes a new instance of the <see cref="T:System.UriTemplate" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the `ignoreTrailingSlash` is set to `true`, trailing slashes on the end of template are ignored when matching a candidate URI. For example, a template such as `http://www.microsoft.com/customer/` would match the following candidate URIs:
- `http://www.microsoft.com/customer/`
- `http://www.microsoft.com/customer`
- `http://www.microsoft.com/customer/?wsdl`
- `http://www.microsoft.com/customer?wsdl`
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UriTemplate (string template, System.Collections.Generic.IDictionary<string,string> additionalDefaults);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string template, class System.Collections.Generic.IDictionary`2<string, string> additionalDefaults) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.#ctor(System.String,System.Collections.Generic.IDictionary{System.String,System.String})" />
<MemberSignature Language="VB.NET" Value="Public Sub New (template As String, additionalDefaults As IDictionary(Of String, String))" />
<MemberSignature Language="F#" Value="new UriTemplate : string * System.Collections.Generic.IDictionary<string, string> -> UriTemplate" Usage="new System.UriTemplate (template, additionalDefaults)" />
<MemberSignature Language="C++ CLI" Value="public:
 UriTemplate(System::String ^ template, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ additionalDefaults);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="template" Type="System.String" />
<Parameter Name="additionalDefaults" Type="System.Collections.Generic.IDictionary<System.String,System.String>" />
</Parameters>
<Docs>
<param name="template">The template string.</param>
<param name="additionalDefaults">A dictionary that contains a list of default values for the template parameters.</param>
<summary>Initializes a new instance of the <see cref="T:System.UriTemplate" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UriTemplate (string template, bool ignoreTrailingSlash, System.Collections.Generic.IDictionary<string,string> additionalDefaults);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string template, bool ignoreTrailingSlash, class System.Collections.Generic.IDictionary`2<string, string> additionalDefaults) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.#ctor(System.String,System.Boolean,System.Collections.Generic.IDictionary{System.String,System.String})" />
<MemberSignature Language="VB.NET" Value="Public Sub New (template As String, ignoreTrailingSlash As Boolean, additionalDefaults As IDictionary(Of String, String))" />
<MemberSignature Language="F#" Value="new UriTemplate : string * bool * System.Collections.Generic.IDictionary<string, string> -> UriTemplate" Usage="new System.UriTemplate (template, ignoreTrailingSlash, additionalDefaults)" />
<MemberSignature Language="C++ CLI" Value="public:
 UriTemplate(System::String ^ template, bool ignoreTrailingSlash, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ additionalDefaults);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="template" Type="System.String" />
<Parameter Name="ignoreTrailingSlash" Type="System.Boolean" />
<Parameter Name="additionalDefaults" Type="System.Collections.Generic.IDictionary<System.String,System.String>" />
</Parameters>
<Docs>
<param name="template">The template string.</param>
<param name="ignoreTrailingSlash">
<see langword="true" /> if the trailing slash "/" characters are ignored; otherwise <see langword="false" />.</param>
<param name="additionalDefaults">A dictionary that contains a list of default values for the template parameters.</param>
<summary>Initializes a new instance of the <see cref="T:System.UriTemplate" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="BindByName">
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates a new URI from the template and the collection of parameters.</summary>
</Docs>
</MemberGroup>
<Member MemberName="BindByName">
<MemberSignature Language="C#" Value="public Uri BindByName (Uri baseAddress, System.Collections.Generic.IDictionary<string,string> parameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Uri BindByName(class System.Uri baseAddress, class System.Collections.Generic.IDictionary`2<string, string> parameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.BindByName(System.Uri,System.Collections.Generic.IDictionary{System.String,System.String})" />
<MemberSignature Language="VB.NET" Value="Public Function BindByName (baseAddress As Uri, parameters As IDictionary(Of String, String)) As Uri" />
<MemberSignature Language="F#" Value="member this.BindByName : Uri * System.Collections.Generic.IDictionary<string, string> -> Uri" Usage="uriTemplate.BindByName (baseAddress, parameters)" />
<MemberSignature Language="C++ CLI" Value="public:
 Uri ^ BindByName(Uri ^ baseAddress, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ parameters);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseAddress" Type="System.Uri" />
<Parameter Name="parameters" Type="System.Collections.Generic.IDictionary<System.String,System.String>" />
</Parameters>
<Docs>
<param name="baseAddress">The base address.</param>
<param name="parameters">A dictionary that contains a collection of parameter name/value pairs.</param>
<summary>Creates a new URI from the template and the collection of parameters.</summary>
<returns>A URI.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The [IDictionary\<string,string>](xref:System.Collections.Generic.IDictionary%602) 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.
> [!NOTE]
> 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.
> [!IMPORTANT]
> 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 '}'.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BindByName">
<MemberSignature Language="C#" Value="public Uri BindByName (Uri baseAddress, System.Collections.Specialized.NameValueCollection parameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Uri BindByName(class System.Uri baseAddress, class System.Collections.Specialized.NameValueCollection parameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.BindByName(System.Uri,System.Collections.Specialized.NameValueCollection)" />
<MemberSignature Language="VB.NET" Value="Public Function BindByName (baseAddress As Uri, parameters As NameValueCollection) As Uri" />
<MemberSignature Language="F#" Value="member this.BindByName : Uri * System.Collections.Specialized.NameValueCollection -> Uri" Usage="uriTemplate.BindByName (baseAddress, parameters)" />
<MemberSignature Language="C++ CLI" Value="public:
 Uri ^ BindByName(Uri ^ baseAddress, System::Collections::Specialized::NameValueCollection ^ parameters);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseAddress" Type="System.Uri" />
<Parameter Name="parameters" Type="System.Collections.Specialized.NameValueCollection" />
</Parameters>
<Docs>
<param name="baseAddress">The base address.</param>
<param name="parameters">The parameter values.</param>
<summary>Creates a new URI from the template and the collection of parameters.</summary>
<returns>A new instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Collections.Specialized.NameValueCollection> parameter contains a collection of parameter name/value pairs. The parameters are matched up against the variables within the template by a case-insensitive comparison. Values passed in this collection are escaped.
> [!NOTE]
> The name/value collection passed to <xref:System.UriTemplate.BindByName%28System.Uri%2CSystem.Collections.Specialized.NameValueCollection%29> 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.
> [!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 '}'.
## Examples
The following example shows how to call the <xref:System.UriTemplate.BindByName%28System.Uri%2CSystem.Collections.Specialized.NameValueCollection%29> method.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet4":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BindByName">
<MemberSignature Language="C#" Value="public Uri BindByName (Uri baseAddress, System.Collections.Generic.IDictionary<string,string> parameters, bool omitDefaults);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Uri BindByName(class System.Uri baseAddress, class System.Collections.Generic.IDictionary`2<string, string> parameters, bool omitDefaults) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.BindByName(System.Uri,System.Collections.Generic.IDictionary{System.String,System.String},System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Function BindByName (baseAddress As Uri, parameters As IDictionary(Of String, String), omitDefaults As Boolean) As Uri" />
<MemberSignature Language="F#" Value="member this.BindByName : Uri * System.Collections.Generic.IDictionary<string, string> * bool -> Uri" Usage="uriTemplate.BindByName (baseAddress, parameters, omitDefaults)" />
<MemberSignature Language="C++ CLI" Value="public:
 Uri ^ BindByName(Uri ^ baseAddress, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ parameters, bool omitDefaults);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseAddress" Type="System.Uri" />
<Parameter Name="parameters" Type="System.Collections.Generic.IDictionary<System.String,System.String>" />
<Parameter Name="omitDefaults" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="baseAddress">A URI that contains the base address.</param>
<param name="parameters">A dictionary that contains a collection of parameter name/value pairs.</param>
<param name="omitDefaults">
<see langword="true" /> is the default values are ignored; otherwise <see langword="false" />.</param>
<summary>Creates a new URI from the template and the collection of parameters.</summary>
<returns>A URI.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="BindByName">
<MemberSignature Language="C#" Value="public Uri BindByName (Uri baseAddress, System.Collections.Specialized.NameValueCollection parameters, bool omitDefaults);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Uri BindByName(class System.Uri baseAddress, class System.Collections.Specialized.NameValueCollection parameters, bool omitDefaults) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.BindByName(System.Uri,System.Collections.Specialized.NameValueCollection,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Function BindByName (baseAddress As Uri, parameters As NameValueCollection, omitDefaults As Boolean) As Uri" />
<MemberSignature Language="F#" Value="member this.BindByName : Uri * System.Collections.Specialized.NameValueCollection * bool -> Uri" Usage="uriTemplate.BindByName (baseAddress, parameters, omitDefaults)" />
<MemberSignature Language="C++ CLI" Value="public:
 Uri ^ BindByName(Uri ^ baseAddress, System::Collections::Specialized::NameValueCollection ^ parameters, bool omitDefaults);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseAddress" Type="System.Uri" />
<Parameter Name="parameters" Type="System.Collections.Specialized.NameValueCollection" />
<Parameter Name="omitDefaults" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="baseAddress">The base address.</param>
<param name="parameters">A collection of parameter name/value pairs.</param>
<param name="omitDefaults">
<see langword="true" /> if the default values are ignored; otherwise <see langword="false" />.</param>
<summary>Creates a new URI from the template and the collection of parameters.</summary>
<returns>A URI.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="BindByPosition">
<MemberSignature Language="C#" Value="public Uri BindByPosition (Uri baseAddress, params string[] values);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Uri BindByPosition(class System.Uri baseAddress, string[] values) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.BindByPosition(System.Uri,System.String[])" />
<MemberSignature Language="VB.NET" Value="Public Function BindByPosition (baseAddress As Uri, ParamArray values As String()) As Uri" />
<MemberSignature Language="F#" Value="member this.BindByPosition : Uri * string[] -> Uri" Usage="uriTemplate.BindByPosition (baseAddress, values)" />
<MemberSignature Language="C++ CLI" Value="public:
 Uri ^ BindByPosition(Uri ^ baseAddress, ... cli::array <System::String ^> ^ values);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseAddress" Type="System.Uri" />
<Parameter Name="values" Type="System.String[]">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ParamArray]</AttributeName>
<AttributeName Language="F#">[<System.ParamArray>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="baseAddress">A <see cref="T:System.Uri" /> that contains the base address.</param>
<param name="values">The parameter values.</param>
<summary>Creates a new URI from the template and an array of parameter values.</summary>
<returns>A new <see cref="T:System.Uri" /> instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The parameter values are bound by position left to right. The first parameter value replaces the first variable found in the template, the second parameter value replaces the second variable, and so on. Variables passed to this method are escaped.
> [!NOTE]
> The number of parameters passed in the values parameter must match the number of variables in the template. If not, a <xref:System.FormatException> is thrown.
> [!NOTE]
> It is possible to pass in text within the parameter values array that prevents the generated URI from matching the template that is used to generate it. Examples of such text includes: '/', '.','..', '*', '{', and '}'. The following code demonstrates this.
`UriTemplate template = new UriTemplate("far/{bat}/baz");`
`Uri uri = new Uri("http://localhost/Base");`
`Uri result = template.BindByPosition(uri, "."); // returns Base/form/baz`
`Uri result = template.BindByPosition(uri, ".."); // returns Base/baz`
`Uri result = template.BindByPosition(uri, "x/y"); // returns Base/form/x/y/baz`
`Uri result = template.BindByPosition(uri, "{x}"); // returns Base/form/{x}/baz`
`Uri result = template.BindByPosition(uri, "*"); // returns Base/form/*/baz`
## Examples
The following example shows how to call the <xref:System.UriTemplate.BindByPosition%28System.Uri%2CSystem.String%5B%5D%29>.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet5":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Defaults">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IDictionary<string,string> Defaults { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IDictionary`2<string, string> Defaults" />
<MemberSignature Language="DocId" Value="P:System.UriTemplate.Defaults" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Defaults As IDictionary(Of String, String)" />
<MemberSignature Language="F#" Value="member this.Defaults : System.Collections.Generic.IDictionary<string, string>" Usage="System.UriTemplate.Defaults" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ Defaults { System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IDictionary<System.String,System.String></ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of name/value pairs for any default parameter values.</summary>
<value>A generic dictionary.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IgnoreTrailingSlash">
<MemberSignature Language="C#" Value="public bool IgnoreTrailingSlash { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IgnoreTrailingSlash" />
<MemberSignature Language="DocId" Value="P:System.UriTemplate.IgnoreTrailingSlash" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IgnoreTrailingSlash As Boolean" />
<MemberSignature Language="F#" Value="member this.IgnoreTrailingSlash : bool" Usage="System.UriTemplate.IgnoreTrailingSlash" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IgnoreTrailingSlash { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies whether trailing slashes "/" in the template should be ignored when matching candidate URIs.</summary>
<value>
<see langword="true" /> if trailing slashes "/" should be ignored, otherwise <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsEquivalentTo">
<MemberSignature Language="C#" Value="public bool IsEquivalentTo (UriTemplate other);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool IsEquivalentTo(class System.UriTemplate other) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.IsEquivalentTo(System.UriTemplate)" />
<MemberSignature Language="VB.NET" Value="Public Function IsEquivalentTo (other As UriTemplate) As Boolean" />
<MemberSignature Language="F#" Value="member this.IsEquivalentTo : UriTemplate -> bool" Usage="uriTemplate.IsEquivalentTo other" />
<MemberSignature Language="C++ CLI" Value="public:
 bool IsEquivalentTo(UriTemplate ^ other);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="other" Type="System.UriTemplate" />
</Parameters>
<Docs>
<param name="other">The <see cref="T:System.UriTemplate" /> to compare.</param>
<summary>Indicates whether a <see cref="T:System.UriTemplate" /> is structurally equivalent to another.</summary>
<returns>
<see langword="true" /> if the <see cref="T:System.UriTemplate" /> is structurally equivalent to another; otherwise <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Two <xref:System.UriTemplate> instances are equivalent if their literal strings are identical and the variables appear in the same segments. For example "weather/{state}/{city}" is equivalent to "weather/{country}/{village}".
## Examples
The following example shows how to call the <xref:System.UriTemplate.IsEquivalentTo%28System.UriTemplate%29>.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet6":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Match">
<MemberSignature Language="C#" Value="public UriTemplateMatch Match (Uri baseAddress, Uri candidate);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.UriTemplateMatch Match(class System.Uri baseAddress, class System.Uri candidate) cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.Match(System.Uri,System.Uri)" />
<MemberSignature Language="VB.NET" Value="Public Function Match (baseAddress As Uri, candidate As Uri) As UriTemplateMatch" />
<MemberSignature Language="F#" Value="member this.Match : Uri * Uri -> UriTemplateMatch" Usage="uriTemplate.Match (baseAddress, candidate)" />
<MemberSignature Language="C++ CLI" Value="public:
 UriTemplateMatch ^ Match(Uri ^ baseAddress, Uri ^ candidate);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.UriTemplateMatch</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseAddress" Type="System.Uri" />
<Parameter Name="candidate" Type="System.Uri" />
</Parameters>
<Docs>
<param name="baseAddress">The base address.</param>
<param name="candidate">The <see cref="T:System.Uri" /> to match against the template.</param>
<summary>Attempts to match a <see cref="T:System.Uri" /> to a <see cref="T:System.UriTemplate" />.</summary>
<returns>An instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the match is successful the <xref:System.UriTemplateMatch> is populated with the URI segments, variable values, query string values, and wildcard segments from the candidate URI. If the match is unsuccessful, `null` is returned.
## Examples
The following example shows how to call the <xref:System.UriTemplate.Match%28System.Uri%2CSystem.Uri%29> method.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet7":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="PathSegmentVariableNames">
<MemberSignature Language="C#" Value="public System.Collections.ObjectModel.ReadOnlyCollection<string> PathSegmentVariableNames { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ObjectModel.ReadOnlyCollection`1<string> PathSegmentVariableNames" />
<MemberSignature Language="DocId" Value="P:System.UriTemplate.PathSegmentVariableNames" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property PathSegmentVariableNames As ReadOnlyCollection(Of String)" />
<MemberSignature Language="F#" Value="member this.PathSegmentVariableNames : System.Collections.ObjectModel.ReadOnlyCollection<string>" Usage="System.UriTemplate.PathSegmentVariableNames" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ PathSegmentVariableNames { System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.ObjectModel.ReadOnlyCollection<System.String></ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of variable names used within path segments in the template.</summary>
<value>A collection of variable names that appear within the template's path segment.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The collection excludes the names of variables that appear in the query portion of the template.
## Examples
The following example shows how to access the <xref:System.UriTemplate.PathSegmentVariableNames%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="QueryValueVariableNames">
<MemberSignature Language="C#" Value="public System.Collections.ObjectModel.ReadOnlyCollection<string> QueryValueVariableNames { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ObjectModel.ReadOnlyCollection`1<string> QueryValueVariableNames" />
<MemberSignature Language="DocId" Value="P:System.UriTemplate.QueryValueVariableNames" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property QueryValueVariableNames As ReadOnlyCollection(Of String)" />
<MemberSignature Language="F#" Value="member this.QueryValueVariableNames : System.Collections.ObjectModel.ReadOnlyCollection<string>" Usage="System.UriTemplate.QueryValueVariableNames" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ QueryValueVariableNames { System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.ObjectModel.ReadOnlyCollection<System.String></ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of variable names used within the query string in the template.</summary>
<value>A collection of template variable names that appear in the query portion of the template string.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This collection excludes variable names that appear in the path section of the template string.
## Examples
The following example shows how to access the <xref:System.UriTemplate.QueryValueVariableNames%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet3":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.UriTemplate.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="F#" Value="override this.ToString : unit -> string" Usage="uriTemplate.ToString " />
<MemberSignature Language="C++ CLI" Value="public:
 override System::String ^ ToString();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ServiceModel</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ServiceModel.Web</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a string representation of the <see cref="T:System.UriTemplate" /> instance.</summary>
<returns>The representation of the <see cref="T:System.UriTemplate" /> instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example shows how to call the <xref:System.UriTemplate.ToString> method.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/uritemplate/cs/snippets.cs" id="Snippet8":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/uritemplate/vb/snippets.vb" id="Snippet8":::
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>