DicomObjects.NET.8.48 Documentation
DicomObjects.DicomWeb Namespace / ContentType Class / ToMediaType Method






In This Topic
    ToMediaType Method
    In This Topic
    Formatting the Header value for the current media type based on its properties
    Syntax
    'Declaration
     
    
    Public Function ToMediaType( _
       ByVal AllowMulti As System.Boolean, _
       ByVal WithQuality As System.Boolean _
    ) As System.Net.Http.Headers.MediaTypeHeaderValue
    'Usage
     
    
    Dim instance As ContentType
    Dim AllowMulti As System.Boolean
    Dim WithQuality As System.Boolean
    Dim value As System.Net.Http.Headers.MediaTypeHeaderValue
     
    value = instance.ToMediaType(AllowMulti, WithQuality)
    public System.Net.Http.Headers.MediaTypeHeaderValue ToMediaType( 
       System.bool AllowMulti,
       System.bool WithQuality
    )
    public function ToMediaType( 
        AllowMulti: System.Boolean;
        WithQuality: System.Boolean
    ): System.Net.Http.Headers.MediaTypeHeaderValue; 
    public function ToMediaType( 
       AllowMulti : System.boolean,
       WithQuality : System.boolean
    ) : System.Net.Http.Headers.MediaTypeHeaderValue;
    public: System.Net.Http.Headers.MediaTypeHeaderValue* ToMediaType( 
       System.bool AllowMulti,
       System.bool WithQuality
    ) 
    public:
    System.Net.Http.Headers.MediaTypeHeaderValue^ ToMediaType( 
       System.bool AllowMulti,
       System.bool WithQuality
    ) 

    Parameters

    AllowMulti
    WithQuality

    Return Value

    Returns the MediaType header value which can be incorporated in the HTTP request
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also