C# Class Swensen.Ior.Core.IorContentType

An immutable wrapper around our underlying content type representation which provides specialized processing for various processing like pretty printing and choosing correct file extensions.
Exibir arquivo Open project: SwensenSoftware/im-only-resting Class Usage Examples

Public Properties

Property Type Description
MediaType string
MediaTypeCategory IorMediaTypeCategory

Public Methods

Method Description
GetFileExtension ( IorMediaTypeCategory mtc, string mt, Uri requestUri ) : string
GetMediaTypeCategory ( string mt ) : IorMediaTypeCategory
GetPrettyPrintedContent ( IorMediaTypeCategory mtc, string content ) : string

If contentType is an xml content type, then try to pretty print the rawContent. If that fails or otherwise, just return the rawContent

IorContentType ( ) : System
IorContentType ( string contentType ) : System

Method Details

GetFileExtension() public static method

public static GetFileExtension ( IorMediaTypeCategory mtc, string mt, Uri requestUri ) : string
mtc IorMediaTypeCategory
mt string
requestUri System.Uri
return string

GetMediaTypeCategory() public static method

public static GetMediaTypeCategory ( string mt ) : IorMediaTypeCategory
mt string
return IorMediaTypeCategory

GetPrettyPrintedContent() public static method

If contentType is an xml content type, then try to pretty print the rawContent. If that fails or otherwise, just return the rawContent
public static GetPrettyPrintedContent ( IorMediaTypeCategory mtc, string content ) : string
mtc IorMediaTypeCategory
content string
return string

IorContentType() public method

public IorContentType ( ) : System
return System

IorContentType() public method

public IorContentType ( string contentType ) : System
contentType string
return System

Property Details

MediaType public_oe property

public string MediaType
return string

MediaTypeCategory public_oe property

public IorMediaTypeCategory MediaTypeCategory
return IorMediaTypeCategory