ODataUtils.SetMimeType Method
Sets the MIME type annotation of the annotatable to mimeType.
Namespace: Microsoft.Data.OData
Assembly: Microsoft.Data.OData (in Microsoft.Data.OData.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Sub SetMimeType ( _
model As IEdmModel, _
annotatable As IEdmElement, _
mimeType As String _
)
'Usage
Dim model As IEdmModel
Dim annotatable As IEdmElement
Dim mimeType As String
model.SetMimeType(annotatable, mimeType)
public static void SetMimeType(
this IEdmModel model,
IEdmElement annotatable,
string mimeType
)
[ExtensionAttribute]
public:
static void SetMimeType(
IEdmModel^ model,
IEdmElement^ annotatable,
String^ mimeType
)
static member SetMimeType :
model:IEdmModel *
annotatable:IEdmElement *
mimeType:string -> unit
public static function SetMimeType(
model : IEdmModel,
annotatable : IEdmElement,
mimeType : String
)
Parameters
- model
Type: Microsoft.Data.Edm.IEdmModel
The IEdmModel containing the annotation.
- annotatable
Type: Microsoft.Data.Edm.IEdmElement
The IEdmElement to modify.
- mimeType
Type: System.String
The MIME type 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 MIME type annotation is only supported on service operations and primitive properties for serialization purposes.