src/packages/EmbedIO/MimeTypeCustomizerExtensions.cs
/// <summary>
/// Adds a custom association between a file extension and a MIME type.
/// </summary>
/// <typeparam name="T">The type of the object to which this method is applied.</typeparam>
/// <param name="this">The object to which this method is applied.</param>
/// <param name="extension">The file extension to associate to <paramref name="mimeType"/>.</param>
/// <param name="mimeType">The MIME type to associate to <paramref name="extension"/>.</param>
/// <returns><paramref name="this"/> with the custom association added.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <exception cref="InvalidOperationException"><paramref name="this"/> has its configuration locked.</exception>
/// <exception cref="ArgumentNullException">
/// <para><paramref name="extension"/>is <see langword="null"/>.</para>
/// <para>- or -</para>
/// <para><paramref name="mimeType"/>is <see langword="null"/>.</para>
/// </exception>
/// <exception cref="ArgumentException">
/// <para><paramref name="extension"/>is the empty string.</para>
/// <para>- or -</para>
/// <para><paramref name="mimeType"/>is not a valid MIME type.</para>
/// </exception>
Adds a custom association between a file extension and a MIME type.
Adds a custom association between a file extension and a MIME type .
public static T WithCustomMimeType<T>(this T @this, string extension, string mimeType)
            where T : IMimeTypeCustomizer
        {
            @this.AddCustomMimeType(extension, mimeType);
            return @this;
        }
public static T WithCustomMimeType < T > ( this T @this , string extension , string mimeType ) where T : IMimeTypeCustomizer { @this . AddCustomMimeType ( extension , mimeType ) ; return @this ; }
Adds a custom association between a file extension and a MIME type.
Adds a custom association between a file extension and a MIME type .
with the custom association added.
with the custom association added .
None
has its configuration locked.
has its configuration locked .
None
None
T
this
extension
string
The file extension to associate to .
The file extension to associate to .
mimeType
string
The MIME type to associate to .
The MIME type to associate to .
this
The object to which this method is applied.
The object to which this method is applied .
typeparam
The type of the object to which this method is applied.
The type of the object to which this method is applied .