UriTemplateExpression 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示 URI 範本剖析結果的類別。
public sealed class UriTemplateExpression
type UriTemplateExpression = class
Public NotInheritable Class UriTemplateExpression
- 繼承
-
UriTemplateExpression
備註
URI 範本是以括弧括住的字串,其能夠描述一系列統一資源識別項。 URI 範本可用於建置和剖析 URI。 將 的 ODataUriParser EnableUriTemplateParsing 屬性設定為 true,以啟用剖析 Uri 範本。
例如,在下列 URI http://example.org/service/Customers({CID}) {CID} 中,是 Customers 識別碼區段的驗證 URI 範本,在 的剖析結果 UriTemplateExpressionLiteralText 中,會是原始常值 「{CID}」,而且 ExpectedType 是 Customers 識別碼的實際類型。
如需詳細資訊,請參閱 RFC6570。
建構函式
UriTemplateExpression() |
表示 URI 範本剖析結果的類別。 |
屬性
ExpectedType |
Uri 範本所代表之物件的預期類型。 |
LiteralText |
Uri 範本的原始文字。 |