# OpcCertificateJudgementEventArgs Members

> Reference: Provides the event data for 'CertificateJudgement' events.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcCertificateJudgementEventArgs</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Inherits members from [EventArgs](https://learn.microsoft.com/dotnet/api/system.eventargs).

## Constructors

### OpcCertificateJudgementEventArgs

Initializes a new instance of the [OpcCertificateJudgementEventArgs](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/) class using the event data specified.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcCertificateJudgementEventArgs(
    X509Certificate2 trustedCertificate,
    X509Certificate2 impeachedCertificate,
    OpcCertificateImpeachment impeachment,
    OpcResult impeachmentInfo)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub New(
    trustedCertificate As X509Certificate2,
    impeachedCertificate As X509Certificate2,
    impeachment As OpcCertificateImpeachment,
    impeachmentInfo As OpcResult)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `trustedCertificate` | [X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2) | The [X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2) instance providing the trusted certificate data. |
| `impeachedCertificate` | [X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2) | The [X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2) instance providing the impeached certificate data. |
| `impeachment` | [OpcCertificateImpeachment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificateimpeachment/) | The kind of impeachement the impeached certificate is confronted with. |
| `impeachmentInfo` | [OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/) | The [OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/) which provides additional information about the `impeachment`. This information is also used in case of an non-dismissed judgement for an exception. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `impeachmentInfo` is a null reference (Nothing in Visual Basic). |

## Properties

### Dismiss

Gets or sets a value indicating whether the impeachment of the [ImpeachedCertificate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/members#impeachedcertificate) is to be rejected independent from the [Impeachment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/members#impeachment) of the certificate judgement.

<div class="api-signature" data-lang="csharp">

```csharp
public bool Dismiss { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Property Dismiss As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true to reject the impeachment of the [ImpeachedCertificate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/members#impeachedcertificate); otherwise the value false. The default value is false.

### ImpeachedCertificate

Gets the certificate which is impeached.

<div class="api-signature" data-lang="csharp">

```csharp
public X509Certificate2 ImpeachedCertificate { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property ImpeachedCertificate As X509Certificate2
```

</div>

**Property value**

[X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2)

An instance of the [X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2) class representing the certificate which is impeached.

### Impeachment

Gets a value indicating the kind of impeachment the [ImpeachedCertificate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/members#impeachedcertificate) is confronted with.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcCertificateImpeachment Impeachment { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property Impeachment As OpcCertificateImpeachment
```

</div>

**Property value**

[OpcCertificateImpeachment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificateimpeachment/)

One of the members defined by the [OpcCertificateImpeachment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificateimpeachment/) enumeration.

### ImpeachmentInfo

Gets the information used to represent the [Impeachment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/members#impeachment) in case there an exception is to be thrown.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcResult ImpeachmentInfo { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property ImpeachmentInfo As OpcResult
```

</div>

**Property value**

[OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/)

The information associated with the [Impeachment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/members#impeachment) which is used for any subsequently thrown exception.

### TrustedCertificate

Gets the certificate which is trusted.

<div class="api-signature" data-lang="csharp">

```csharp
public X509Certificate2 TrustedCertificate { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property TrustedCertificate As X509Certificate2
```

</div>

**Property value**

[X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2)

An instance of the [X509Certificate2](https://learn.microsoft.com/dotnet/api/system.security.cryptography.x509certificates.x509certificate2) class representing the certificate which is trusted.

## Methods

### ToString

<span class="api-meta">override</span>

Returns a string that represents the current [OpcCertificateJudgementEventArgs](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/).

<div class="api-signature" data-lang="csharp">

```csharp
public override string ToString()
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Overrides Function ToString() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

A string that represents the current [OpcCertificateJudgementEventArgs](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/) including either the [ImpeachmentInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/members#impeachmentinfo) (if available) or the [Impeachment](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatejudgementeventargs/members#impeachment) of the event data represented.

**Overrides**

[ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)
