Share via


FormatManager.TryMapFormatFriendlyName Method (String, ContentType)

 

Returns true if the specified format name ('xml' for instance) can be mapped to a content type ('application/xml' for instance). If the mapping can be performed return the content type that the friendlyName maps to.

Namespace:   Microsoft.Web.Mvc.Resources
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

Syntax

public bool TryMapFormatFriendlyName(
    string formatName,
    out ContentType contentType
)
public:
bool TryMapFormatFriendlyName(
    String^ formatName,
    [OutAttribute] ContentType^% contentType
)
member TryMapFormatFriendlyName : 
        formatName:string *
        contentType:ContentType byref -> bool
Public Function TryMapFormatFriendlyName (
    formatName As String,
    <OutAttribute> ByRef contentType As ContentType
) As Boolean

Parameters

Return Value

Type: System.Boolean

true if the specified format name ('xml' for instance) can be mapped to a content type ('application/xml' for instance); otherwise, false.

See Also

FormatManager Class
Microsoft.Web.Mvc.Resources Namespace

Return to top