CustomUriLiteralPrefixes.AddCustomLiteralPrefix 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為指定的 EdmType 新增常值前置詞。
public static void AddCustomLiteralPrefix (string literalPrefix, Microsoft.OData.Edm.IEdmTypeReference literalEdmTypeReference);
static member AddCustomLiteralPrefix : string * Microsoft.OData.Edm.IEdmTypeReference -> unit
Public Shared Sub AddCustomLiteralPrefix (literalPrefix As String, literalEdmTypeReference As IEdmTypeReference)
參數
- literalPrefix
- String
常值前置詞的自訂名稱
- literalEdmTypeReference
- IEdmTypeReference
自訂常值的 edm 類型
例外狀況
引數為 Null 或空白
指定的常值前置詞無效
指定的常值前置詞已經存在
範例
filter=MyProperty eq MyCustomLiteral'VALUE'。
「MyCustomLiteral」 是常值前置詞, literalEdmTypeReference
而 是 「VALUE」 的類型。