Table of Contents

Class ReEncryptionResult<T>

Namespace
Excalibur.Compliance
Assembly
Excalibur.Compliance.Abstractions.dll

Result of a single re-encryption operation with the entity.

public sealed class ReEncryptionResult<T> where T : class

Type Parameters

T

The entity type.

Inheritance
ReEncryptionResult<T>
Inherited Members

Properties

Duration

Gets the duration of the re-encryption operation.

public TimeSpan Duration { get; init; }

Property Value

TimeSpan

Entity

Gets the entity (re-encrypted if successful, original if failed).

public required T Entity { get; init; }

Property Value

T

ErrorMessage

Gets the error message if the operation failed.

public string? ErrorMessage { get; init; }

Property Value

string

Exception

Gets the exception if the operation failed.

public Exception? Exception { get; init; }

Property Value

Exception

FieldsReEncrypted

Gets the number of fields that were re-encrypted.

public int FieldsReEncrypted { get; init; }

Property Value

int

SourceProviderId

Gets the source provider ID that was used for decryption.

public string? SourceProviderId { get; init; }

Property Value

string

Success

Gets a value indicating whether the re-encryption succeeded.

public required bool Success { get; init; }

Property Value

bool

TargetProviderId

Gets the target provider ID that was used for encryption.

public string? TargetProviderId { get; init; }

Property Value

string

Methods

Failed(T, string, Exception?)

Creates a failed result.

public static ReEncryptionResult<T> Failed(T entity, string errorMessage, Exception? exception = null)

Parameters

entity T
errorMessage string
exception Exception

Returns

ReEncryptionResult<T>

Succeeded(T, string, string, int, TimeSpan)

Creates a successful result.

public static ReEncryptionResult<T> Succeeded(T entity, string sourceProviderId, string targetProviderId, int fieldsReEncrypted, TimeSpan duration)

Parameters

entity T
sourceProviderId string
targetProviderId string
fieldsReEncrypted int
duration TimeSpan

Returns

ReEncryptionResult<T>