Table of Contents

Class VersionMigrationResult

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

Represents the result of a single migration operation.

public sealed record VersionMigrationResult : IEquatable<VersionMigrationResult>
Inheritance
VersionMigrationResult
Implements
Inherited Members

Constructors

VersionMigrationResult(byte[], byte[]?, EncryptionVersion, EncryptionVersion, bool, string?, TimeSpan)

Represents the result of a single migration operation.

public VersionMigrationResult(byte[] OriginalCiphertext, byte[]? MigratedCiphertext, EncryptionVersion SourceVersion, EncryptionVersion TargetVersion, bool Success, string? ErrorMessage, TimeSpan Duration)

Parameters

OriginalCiphertext byte[]

The original ciphertext before migration.

MigratedCiphertext byte[]

The migrated ciphertext (null if migration failed).

SourceVersion EncryptionVersion

The source encryption version.

TargetVersion EncryptionVersion

The target encryption version.

Success bool

Whether the migration succeeded.

ErrorMessage string

The error message if migration failed.

Duration TimeSpan

The duration of the migration operation.

Properties

Duration

The duration of the migration operation.

public TimeSpan Duration { get; init; }

Property Value

TimeSpan

ErrorMessage

The error message if migration failed.

public string? ErrorMessage { get; init; }

Property Value

string

MigratedCiphertext

The migrated ciphertext (null if migration failed).

public byte[]? MigratedCiphertext { get; init; }

Property Value

byte[]

OriginalCiphertext

The original ciphertext before migration.

public byte[] OriginalCiphertext { get; init; }

Property Value

byte[]

SourceVersion

The source encryption version.

public EncryptionVersion SourceVersion { get; init; }

Property Value

EncryptionVersion

Success

Whether the migration succeeded.

public bool Success { get; init; }

Property Value

bool

TargetVersion

The target encryption version.

public EncryptionVersion TargetVersion { get; init; }

Property Value

EncryptionVersion

Methods

Failed(byte[], EncryptionVersion, EncryptionVersion, string, TimeSpan)

Creates a failed migration result.

public static VersionMigrationResult Failed(byte[] original, EncryptionVersion source, EncryptionVersion target, string error, TimeSpan duration)

Parameters

original byte[]
source EncryptionVersion
target EncryptionVersion
error string
duration TimeSpan

Returns

VersionMigrationResult

NotRequired(byte[], EncryptionVersion)

Creates a "no migration needed" result.

public static VersionMigrationResult NotRequired(byte[] original, EncryptionVersion version)

Parameters

original byte[]
version EncryptionVersion

Returns

VersionMigrationResult

Succeeded(byte[], byte[], EncryptionVersion, EncryptionVersion, TimeSpan)

Creates a successful migration result.

public static VersionMigrationResult Succeeded(byte[] original, byte[] migrated, EncryptionVersion source, EncryptionVersion target, TimeSpan duration)

Parameters

original byte[]
migrated byte[]
source EncryptionVersion
target EncryptionVersion
duration TimeSpan

Returns

VersionMigrationResult