ODataUtils.SetHttpMethod 方法

annotatable 的 HttpMethod 批注设置为 httpMethod

命名空间:  Microsoft.Data.OData
程序集:  Microsoft.Data.OData(在 Microsoft.Data.OData.dll 中)

语法

声明
<ExtensionAttribute> _
Public Shared Sub SetHttpMethod ( _
    model As IEdmModel, _
    annotatable As IEdmElement, _
    httpMethod As String _
)
用法
Dim model As IEdmModel
Dim annotatable As IEdmElement
Dim httpMethod As String

model.SetHttpMethod(annotatable, _
    httpMethod)
public static void SetHttpMethod(
    this IEdmModel model,
    IEdmElement annotatable,
    string httpMethod
)
[ExtensionAttribute]
public:
static void SetHttpMethod(
    IEdmModel^ model, 
    IEdmElement^ annotatable, 
    String^ httpMethod
)
static member SetHttpMethod : 
        model:IEdmModel * 
        annotatable:IEdmElement * 
        httpMethod:string -> unit 
public static function SetHttpMethod(
    model : IEdmModel, 
    annotatable : IEdmElement, 
    httpMethod : String
)

参数

  • httpMethod
    类型:System.String
    要设置为批注值的 HttpMethod 值;如果该值为 null,则将删除现有批注。

用法说明

在 Visual Basic 和 C# 中,您可以对 IEdmModel 类型的任何对象将此方法作为实例方法调用。在您使用实例方法语法调用此方法时,将忽略第一个参数。有关详细信息,请参阅https://msdn.microsoft.com/zh-cn/library/bb384936(v=vs.103)https://msdn.microsoft.com/zh-cn/library/bb383977(v=vs.103)

注释

HttpMethod 批注仅支持用于序列化的服务操作。

请参阅

参考

ODataUtils 类

Microsoft.Data.OData 命名空间