Freigeben über


ODataUtils.GetMimeType-Methode

Überprüft, ob das annotatable-Element eine MIME-Typ-Anmerkung aufweist.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetMimeType ( _
    model As IEdmModel, _
    annotatable As IEdmElement _
) As String
'Usage
Dim model As IEdmModel
Dim annotatable As IEdmElement
Dim returnValue As String

returnValue = model.GetMimeType(annotatable)
public static string GetMimeType(
    this IEdmModel model,
    IEdmElement annotatable
)
[ExtensionAttribute]
public:
static String^ GetMimeType(
    IEdmModel^ model, 
    IEdmElement^ annotatable
)
static member GetMimeType : 
        model:IEdmModel * 
        annotatable:IEdmElement -> string 
public static function GetMimeType(
    model : IEdmModel, 
    annotatable : IEdmElement
) : String

Parameter

Rückgabewert

Typ: System.String
Der (von NULL abweichende) Wert der MIME-Typ-Anmerkung des annotatable-Elements oder NULL, wenn keine MIME-Typ-Anmerkung vorhanden ist.

Hinweis zur Verwendung

In Visual Basic und C# können Sie die Methode als Instanzenmethode für jedes Objekt vom Typ IEdmModel aufrufen. Wenn Sie Instanzmethodensyntax zum Aufruf dieser Methode verwenden, vernachlässigen Sie den ersten Parameter. Weitere Informationen finden Sie unter https://msdn.microsoft.com/de-de/library/bb384936(v=vs.103) oder https://msdn.microsoft.com/de-de/library/bb383977(v=vs.103).

Siehe auch

Verweis

ODataUtils Klasse

Microsoft.Data.OData-Namespace