X509Certificate2ExtensionsGetCertificateContextProperty Method |
Gets a specified certificate context property.
Namespace:
SysadminsLV.PKI.Utils.CLRExtensions
Assembly:
SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax public static X509CertificateContextProperty GetCertificateContextProperty(
this X509Certificate2 cert,
X509CertificatePropertyType propID
)
<ExtensionAttribute>
Public Shared Function GetCertificateContextProperty (
cert As X509Certificate2,
propID As X509CertificatePropertyType
) As X509CertificateContextProperty
public:
[ExtensionAttribute]
static X509CertificateContextProperty^ GetCertificateContextProperty(
X509Certificate2^ cert,
X509CertificatePropertyType propID
)
[<ExtensionAttribute>]
static member GetCertificateContextProperty :
cert : X509Certificate2 *
propID : X509CertificatePropertyType -> X509CertificateContextProperty
Parameters
- cert
- Type: System.Security.Cryptography.X509CertificatesX509Certificate2
Certificate. - propID
- Type: System.Security.Cryptography.X509CertificatesX509CertificatePropertyType
Property ID to retrieve.
Return Value
Type:
X509CertificateContextPropertySpecified certificate context property.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
X509Certificate2. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Exception | Condition |
---|
ArgumentNullException | cert parameter is null reference.
|
UninitializedObjectException |
Certificate object is not initialized and is empty.
|
Exception |
Requested context property is not found for the current certificate object.
|
See Also