Class DefaultMediaTypeProvider
A default format provider.
Inheritance
System.Object
DefaultMediaTypeProvider
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Net.Mime
Assembly: Kephas.Core.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultMediaTypeProvider : IMediaTypeProvider
Constructors
| Improve this Doc View SourceDefaultMediaTypeProvider(ICollection<IExportFactory<IMediaType, MediaTypeMetadata>>)
Initializes a new instance of the DefaultMediaTypeProvider class.
Declaration
public DefaultMediaTypeProvider(ICollection<IExportFactory<IMediaType, MediaTypeMetadata>> formatFactories)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<IExportFactory<IMediaType, MediaTypeMetadata>> | formatFactories | The format factories. |
Methods
| Improve this Doc View SourceGetMediaType(String, Boolean)
Gets the media type based on the media type name.
Declaration
public Type GetMediaType(string mediaTypeName, bool throwIfNotFound = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | mediaTypeName | The media type name. |
System.Boolean | throwIfNotFound | True to throw if a format is not found (optional). |
Returns
Type | Description |
---|---|
System.Type | The media type or |