src/packages/EmbedIO/MimeTypeCustomizerExtensions.cs
/// <summary>
/// Indicates that compression should be preferred when negotiating content encoding
/// for a response with the specified content type, or whose content type is in
/// the specified media range.
/// </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="mimeType">The MIME type or media range.</param>
/// <returns><paramref name="this"/> with the specified preference 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"><paramref name="mimeType"/>is <see langword="null"/>.</exception>
/// <exception cref="ArgumentException"><paramref name="mimeType"/>is not a valid MIME type or media range.</exception>
Indicates that compression should be preferred when negotiating content encoding
for a response with the specified content type, or whose content type is in
the specified media range.
Indicates that compression should be preferred when negotiating content encoding for a response with the specified content type or whose content type is in the specified media range .
public static T PreferCompressionFor<T>(this T @this, string mimeType)
            where T : IMimeTypeCustomizer
        {
            @this.PreferCompression(mimeType, true);
            return @this;
        }
public static T PreferCompressionFor < T > ( this T @this , string mimeType ) where T : IMimeTypeCustomizer { @this . PreferCompression ( mimeType , true ) ; return @this ; }
Indicates that compression should be preferred when negotiating content encoding
for a response with the specified content type, or whose content type is in
the specified media range.
Indicates that compression should be preferred when negotiating content encoding for a response with the specified content type or whose content type is in the specified media range .
with the specified preference added.
with the specified preference added .
None
has its configuration locked.
has its configuration locked .
None
None
T
this
mimeType
string
The MIME type or media range.
The MIME type or media range .
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 .