ODataUtils.SetHttpMethod Method

Sets the HttpMethod annotation of the annotatable to httpMethod.

Namespace:  Microsoft.Data.OData
Assembly:  Microsoft.Data.OData (in Microsoft.Data.OData.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub SetHttpMethod ( _
    model As IEdmModel, _
    annotatable As IEdmElement, _
    httpMethod As String _
)
'Usage
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
)

Parameters

  • httpMethod
    Type: System.String
    The HttpMethod value to set as annotation value; if null, an existing annotation will be removed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEdmModel. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).

Remarks

The HttpMethod annotation is only supported on service operations for serialization purposes.

See Also

Reference

ODataUtils Class

Microsoft.Data.OData Namespace