Share via


MimeParameter.TryGetValue Method (DecodingOptions, out DecodingResults, out String)

The TryGetValue method puts the value of this MimeParameter object into value, but does not throw an exception if the encoding is unsupported.

Namespace: Microsoft.Exchange.Data.Mime
Assembly: Microsoft.Exchange.Data.Common (in microsoft.exchange.data.common.dll)

Syntax

'Declaration
Public Function TryGetValue ( _
    decodingOptions As DecodingOptions, _
    <OutAttribute> ByRef decodingResults As DecodingResults, _
    <OutAttribute> ByRef value As String _
) As Boolean
public bool TryGetValue (
    DecodingOptions decodingOptions,
    out DecodingResults decodingResults,
    out string value
)
public:
bool TryGetValue (
    DecodingOptions decodingOptions, 
    [OutAttribute] DecodingResults% decodingResults, 
    [OutAttribute] String^% value
)
public boolean TryGetValue (
    DecodingOptions decodingOptions, 
    /** @attribute OutAttribute() */ /** @ref */ DecodingResults decodingResults, 
    /** @attribute OutAttribute() */ /** @ref */ String value
)
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.
  • value
    A string in which to store the display name.

Remarks

If None is specified, the TryGetValue method treats the display name as ASCII and converts it to Unicode. Otherwise, TryGetValue 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 TryGetValue.

If null was passed for the decodingOptions parameter, TryGetValue uses the DecodingOptions structure that is passed to the constructor of the MimeDocument constructor.

If the decodingOptions parameter that was passed to the MimeDocument constructor argument was passed as null, TryGetValue 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