XmlFormatHandler.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
public bool TryMapFormatFriendlyName(
string friendlyName,
out ContentType contentType
)
public:
virtual bool TryMapFormatFriendlyName(
String^ friendlyName,
[OutAttribute] ContentType^% contentType
) sealed
abstract TryMapFormatFriendlyName :
friendlyName:string *
contentType:ContentType byref -> bool
override TryMapFormatFriendlyName :
friendlyName:string *
contentType:ContentType byref -> bool
Public Function TryMapFormatFriendlyName (
friendlyName As String,
<OutAttribute> ByRef contentType As ContentType
) As Boolean
Parameters
friendlyName
Type: System.StringThe string friendly name.
contentType
Type: System.Net.Mime.ContentTypeThe content type.
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.
Implements
IResponseFormatHandler.TryMapFormatFriendlyName(String, ContentType)
See Also
XmlFormatHandler Class
Microsoft.Web.Mvc.Resources Namespace
Return to top