共用方式為


UriTemplate 表範例

UriTemplateTable 類別會提供可用來處理 UriTemplate 執行個體集合的字典式關聯表結構。 這樣便可有效地針對表中的所有樣板比對特定的統一資源識別元 (URI),並且擷取與符合樣板相關聯的資料。

這個 UriTemplateTable 範例 (英文) 示範下列與 UriTemplateTable 類別有關的主要概念:

  • 具現化 UriTemplateTable 時的語法。

  • 將索引鍵/值組集合填入 UriTemplateTable

  • 使用 MatchSingle,比對候選 URI 和此表。

若要安裝、建置及執行範例

  1. 若要建置方案的 C# 或 Visual Basic .NET 版本,請遵循 Building the Windows Communication Foundation Samples中的指示。

  2. 若要在單一或多部電腦組態中執行此範例,請遵循執行 Windows Communication Foundation 範例中的指示進行。

另請參閱