Share via


Message.GetCertificateFromMessage Method (CertificatePurposes)

 

Retrieves the X509-based certificate from a message.

Namespace:   Microsoft.ConfigurationManagement.Messaging.Framework
Assembly:  Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)

Syntax

public MessageCertificateX509 GetCertificateFromMessage(
    CertificatePurposes certificatePurpose
)
public:
virtual MessageCertificateX509^ GetCertificateFromMessage(
    CertificatePurposes certificatePurpose
) sealed
Public Function GetCertificateFromMessage (
    certificatePurpose As CertificatePurposes
) As MessageCertificateX509

Parameters

Return Value

Type: Microsoft.ConfigurationManagement.Messaging.Framework.MessageCertificateX509

Certificate object matching the request.

Implements

IMessage.GetCertificateFromMessage(CertificatePurposes)

Exceptions

Exception Condition
ArgumentException

Raised if None or All is specified.

ArgumentOutOfRangeException

Raised if no match is found that meets the purpose.

See Also

Message Class
Microsoft.ConfigurationManagement.Messaging.Framework Namespace

Return to top