API Reference
Class
OutputFormatInfo
Helpers for output format detection and metadata.
Inheritance
- Object
- OutputFormatInfo
Methods
public static OutputFormat FromExtension(String extension) #Returns:
OutputFormatDetects the output format from a file extension (with or without a leading dot).
Parameters
- extension System.String
public static OutputFormat FromPath(String path) #Returns:
OutputFormatDetects the output format from a file path.
Parameters
- path System.String
public static String GetDefaultExtension(OutputFormat format) #Returns:
StringReturns the default file extension (without a leading dot) for a format.
Parameters
- format CodeGlyphX.Rendering.OutputFormat
public static OutputKind GetKind(OutputFormat format) #Returns:
OutputKindReturns the output kind for a given format.
Parameters
- format CodeGlyphX.Rendering.OutputFormat
public static String GetMimeType(OutputFormat format) #Returns:
StringReturns a MIME type for the format when known.
Parameters
- format CodeGlyphX.Rendering.OutputFormat
public static Boolean IsBinary(OutputFormat format) #Returns:
BooleanReturns true when the format is binary.
Parameters
- format CodeGlyphX.Rendering.OutputFormat
public static Boolean IsText(OutputFormat format) #Returns:
BooleanReturns true when the format is textual.
Parameters
- format CodeGlyphX.Rendering.OutputFormat
public static OutputFormat Resolve(String path, OutputFormat fallback) #Returns:
OutputFormatDetects the format from a path and falls back to a default if unknown.
Parameters
- path System.String
- fallback CodeGlyphX.Rendering.OutputFormat