Class MediaFormatExtensions
Extension methods for MediaFormat
Inheritance
System.Object
MediaFormatExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ImageVault.Core.Common.Data
Assembly: ImageVault.Core.dll
Syntax
public static class MediaFormatExtensions
Methods
CalculateOutputType(MediaFormatBase)
Calculates the output type of the supplied format
Declaration
public static MediaFormatOutputTypes CalculateOutputType(this MediaFormatBase format)
Parameters
Type | Name | Description |
---|---|---|
MediaFormatBase | format |
Returns
Type | Description |
---|---|
MediaFormatOutputTypes |
Remarks
This is the only place where MediaFormatOutputType should be read. In addition to the property, it bases it output on any effect that might affect the outcome. Only parsing the MediaFormatOutputType property should not be done directly.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException |
CreateNotSupportedOutputTypeException(MediaFormatBase)
Creates an exception stating that the resulting OutputFormat is not supported
Declaration
public static NotSupportedException CreateNotSupportedOutputTypeException(this MediaFormatBase format)
Parameters
Type | Name | Description |
---|---|---|
MediaFormatBase | format |
Returns
Type | Description |
---|---|
System.NotSupportedException |
GetChangeOutputFormat(MediaFormatBase)
Finds the effective change output format effect
Declaration
public static string GetChangeOutputFormat(this MediaFormatBase format)
Parameters
Type | Name | Description |
---|---|---|
MediaFormatBase | format |
Returns
Type | Description |
---|---|
System.String |
GetOutputType(String)
Returns OutputType based on content type
Declaration
public static MediaFormatOutputTypes? GetOutputType(string contentType)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentType |
Returns
Type | Description |
---|---|
System.Nullable<MediaFormatOutputTypes> |
IsContentTypeASpecialMediaFormatOutputType(String)
Checks if the supplied content type is one of the special MediaFormatOutputTypes that don't correspond to a specific output type
Declaration
public static bool IsContentTypeASpecialMediaFormatOutputType(string contentType)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentType |
Returns
Type | Description |
---|---|
System.Boolean |