Share via


IResponseFormatHandler.TryMapFormatFriendlyName Method (String, ContentType)

 

Returns true if the specified friendly 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

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

Parameters

Return Value

Type: System.Boolean

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

See Also

IResponseFormatHandler Interface
Microsoft.Web.Mvc.Resources Namespace

Return to top