UriTemplate.QueryValueVariableNames 속성

정의

템플릿의 쿼리 문자열에 사용되는 변수 이름 컬렉션을 가져옵니다.

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

속성 값

템플릿 문자열의 쿼리 부분에 나타나는 템플릿 변수 이름 컬렉션입니다.

예제

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

UriTemplate template = new UriTemplate("weather/{state}/{city}?forecast={day}");
Uri prefix = new Uri("http://localhost");

Console.WriteLine("QueryValueVariableNames:");
foreach (string name in template.QueryValueVariableNames)
{
    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("QueryValueVariableNames:")
For Each name As String In template.QueryValueVariableNames
    Console.WriteLine("     {0}", name)
Next

설명

이 컬렉션에서는 템플릿 문자열의 경로 부분에 나타나는 변수의 이름이 제외됩니다.

적용 대상