UriTemplate.PathSegmentVariableNames 속성

정의

템플릿의 경로 세그먼트에 사용되는 변수 이름 컬렉션을 가져옵니다.

public:
 property System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ PathSegmentVariableNames { System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ get(); };
public System.Collections.ObjectModel.ReadOnlyCollection<string> PathSegmentVariableNames { get; }
member this.PathSegmentVariableNames : System.Collections.ObjectModel.ReadOnlyCollection<string>
Public ReadOnly Property PathSegmentVariableNames As ReadOnlyCollection(Of String)

속성 값

ReadOnlyCollection<String>

템플릿의 경로 세그먼트에 나타나는 변수 이름 컬렉션입니다.

예제

다음 예제에서는 PathSegmentVariableNames 속성에 액세스하는 방법을 보여 줍니다.

UriTemplate template = new UriTemplate("weather/{state}/{city}?forecast={day}");

Uri prefix = new Uri("http://localhost");

Console.WriteLine("PathSegmentVariableNames:");
foreach (string name in template.PathSegmentVariableNames)
{
    Console.WriteLine("     {0}", name);
}
Dim template As UriTemplate = New UriTemplate("weather/{state}/{city}?forecast={day}")

Dim prefix As Uri = New Uri("http://localhost")

Console.WriteLine("PathSegmentVariableNames:")
For Each name As String In template.PathSegmentVariableNames
    Console.WriteLine("     {0}", name)
Next

설명

이 컬렉션에서는 템플릿의 쿼리 부분에 나타나는 변수의 이름이 제외됩니다.

적용 대상