UriTemplate.QueryValueVariableNames Vlastnost

Definice

Získá kolekci názvů proměnných použitých v řetězci dotazu v šabloně.

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)

Hodnota vlastnosti

ReadOnlyCollection<String>

Kolekce názvů proměnných šablon, které se zobrazí v části dotazu řetězce šablony.

Příklady

Následující příklad ukazuje, jak získat přístup k QueryValueVariableNames vlastnosti.

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

Poznámky

Tato kolekce vylučuje názvy proměnných, které se zobrazí v části cesta řetězce šablony.

Platí pro