C# Class Microsoft.CodeAnalysis.Sarif.Writers.MimeType

A class containing utility functions for working with MIME types.
Show file Open project: Microsoft/sarif-sdk Class Usage Examples

Public Properties

Property Type Description
Binary string
CSharp string
Cpp string
Default string
Directory string
Java string
Sarif string

Public Methods

Method Description
DetermineFromFileExtension ( Uri fileUri ) : string

Guesses an appropriate MIME type given the extension from a file name.

DetermineFromFileExtension ( string path ) : string

Guesses filePath appropriate MIME type given the extension from a file name.

Private Methods

Method Description
HasExtension ( string fileName, string extension ) : bool

Method Details

DetermineFromFileExtension() public static method

Guesses an appropriate MIME type given the extension from a file name.
public static DetermineFromFileExtension ( Uri fileUri ) : string
fileUri System.Uri
return string

DetermineFromFileExtension() public static method

Guesses filePath appropriate MIME type given the extension from a file name.
public static DetermineFromFileExtension ( string path ) : string
path string File path from which MIME type shall be guessed.
return string

Property Details

Binary public static property

The MIME type for binaries.
public static string Binary
return string

CSharp public static property

The MIME type used for CSharp files.
public static string CSharp
return string

Cpp public static property

The MIME type for C and C++ files.
public static string Cpp
return string

Default public static property

The MIME type to use when no better MIME type is known.
public static string Default
return string

Directory public static property

The MIME type for directories.
public static string Directory
return string

Java public static property

The MIME type for Java source code files.
public static string Java
return string

Sarif public static property

The MIME type for SARIF files.
public static string Sarif
return string