MimeAddressReader.TryGetDisplayName Method (DecodingOptions, out DecodingResults, out String)
The TryGetDisplayName method tries to get the display name of the current address header and makes available information about the encoding of the display name.
Namespace: Microsoft.Exchange.Data.Mime
Assembly: Microsoft.Exchange.Data.Common (in microsoft.exchange.data.common.dll)
Syntax
'Declaration
Public Function TryGetDisplayName ( _
decodingOptions As DecodingOptions, _
<OutAttribute> ByRef decodingResults As DecodingResults, _
<OutAttribute> ByRef displayName As String _
) As Boolean
public bool TryGetDisplayName (
DecodingOptions decodingOptions,
out DecodingResults decodingResults,
out string displayName
)
public:
bool TryGetDisplayName (
DecodingOptions decodingOptions,
[OutAttribute] DecodingResults% decodingResults,
[OutAttribute] String^% displayName
)
public boolean TryGetDisplayName (
DecodingOptions decodingOptions,
/** @attribute OutAttribute() */ /** @ref */ DecodingResults decodingResults,
/** @attribute OutAttribute() */ /** @ref */ String displayName
)
JScript does not support passing value-type arguments by reference.
Parameters
- decodingOptions
A DecodingOptions structure that is used to control the decoding.
- decodingResults
A DecodingResults structure that exposes details about the decoding.
- displayName
A string in which to store the display name.
Remarks
If DecodingFlags.None is specified, the TryGetDisplayName method treats the display name as ASCII and converts it to Unicode. Otherwise, TryGetDisplayName tries to determine the character set used by applying the following criteria in the order listed:
The character set that is defined by RFC 2047.
The character set that is defined by the charset parameter of the Content-Type header.
The character set that is defined by the decodingOptions parameter that is passed to TryGetDisplayName.
If null was passed for the decodingOptions parameter, TryGetDisplayName uses the DecodingOptions structure passed to the constructor of the MimeDocument constructor.
If the decodingOptions parameter that was passed to the MimeDocument constructor argument was passed as null, TryGetDisplayName assumes that the encoding is UTF8.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003,
Target Platforms
Windows Server 2003