Class ImportMapper

Provides mapping utilities between MIME content types and file extensions for import operations.

Inheritance
object
ImportMapper
Namespace: Transit.Shared.Communication.Azure.Exchange
Assembly: Transit.Shared.dll
Syntax
public static class ImportMapper
Remarks

Supported mappings:

Content TypeExtension
application/xml.xml
text/plain.txt
text/csv.csv
application/edifact.edi
application/json.json

Methods

ContentTypeToExtension(string)

Converts a MIME content type to its corresponding file extension.

Declaration
public static string ContentTypeToExtension(string contentType)
Parameters
Type Name Description
string contentType

The MIME content type (e.g., "application/xml").

Returns
Type Description
string

The file extension including the leading dot (e.g., ".xml"), or null if the content type is not supported.

ExtensionToContentType(string)

Converts a file extension to its corresponding MIME content type.

Declaration
public static string ExtensionToContentType(string extension)
Parameters
Type Name Description
string extension

The file extension including the leading dot (e.g., ".xml").

Returns
Type Description
string

The MIME content type (e.g., "application/xml"), or null if the extension is not supported.

In this article
Back to top Generated by DocFX