Unosquare
    Show / Hide Table of Contents

    Class MimeTypeProviderStack

    Manages a stack of MIME type providers.

    This API supports the EmbedIO infrastructure and is not intended to be used directly from your code.

    Inheritance
    Object
    MimeTypeProviderStack
    Implements
    IMimeTypeProvider
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO.Utilities
    Syntax
    public sealed class MimeTypeProviderStack : IMimeTypeProvider

    Methods

    GetMimeType(String)

    Gets the MIME type associated to a file extension.

    Declaration
    public string GetMimeType(string extension)
    Parameters
    Type Name Description
    String extension

    The file extension for which a corresponding MIME type is wanted.

    Returns
    Type Description
    String

    The MIME type corresponding to extension, if one is found; otherwise, null.

    Pop()

    Removes the most recently added MIME type provider from the stack.

    This API supports the EmbedIO infrastructure and is not intended to be used directly from your code.

    Declaration
    public void Pop()

    Push(IMimeTypeProvider)

    Pushes the specified MIME type provider on the stack.

    This API supports the EmbedIO infrastructure and is not intended to be used directly from your code.

    Declaration
    public void Push(IMimeTypeProvider provider)
    Parameters
    Type Name Description
    IMimeTypeProvider provider

    The IMimeTypeProvider interface to push on the stack.

    TryDetermineCompression(String, out Boolean)

    Attempts to determine whether compression should be preferred when negotiating content encoding for a response with the specified content type.

    Declaration
    public bool TryDetermineCompression(string mimeType, out bool preferCompression)
    Parameters
    Type Name Description
    String mimeType

    The MIME type to check.

    Boolean preferCompression

    When this method returns true, a value indicating whether compression should be preferred. This parameter is passed uninitialized.

    Returns
    Type Description
    Boolean

    true if a value is found for mimeType; otherwise, false.

    Implements

    IMimeTypeProvider

    See Also

    IMimeTypeProvider

    Comments

    Back to top Copyright © 2017-2019 Unosquare