Eigenverft.NetLib.Infrastructure
  • Guides
  • API
Show / Hide Table of Contents
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.ConfigurationSets
    • ConfigurationSetApplyMode
    • ConfigurationSetBuilderBindingExtensions
    • ConfigurationSetCoordinatorExtensions
    • ConfigurationSetDefinition
    • ConfigurationSetEventArgs
    • ConfigurationSetEventKind
    • ConfigurationSetNotification
    • ConfigurationSetParticipantSwitchResult
    • ConfigurationSetPendingRestartChange
    • ConfigurationSetRegistration
    • ConfigurationSetStateApplyResult
    • ConfigurationSetStateApplyStatus
    • ConfigurationSetStateFailureKind
    • ConfigurationSetStateStatus
    • ConfigurationSetStateStoreEventArgs
    • ConfigurationSetStateStoreEventKind
    • ConfigurationSetStateStoreExtensions
    • ConfigurationSetStateStoreStatus
    • ConfigurationSetStatus
    • ConfigurationSetSwitchFailureKind
    • ConfigurationSetSwitchResult
    • ConfigurationSetSwitchStatus
    • ConfigurationSetSwitchableJsonExtensions
    • IConfigurationSetCoordinator
    • IConfigurationSetDesiredStateStore
    • IConfigurationSetEventHub
    • IConfigurationSetManager
    • IConfigurationSetStateStore
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.Diagnostics
    • ConfigurationPrecedenceDiagnosticsExtensions
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.Sources
    • HostApplicationBuilderConfigurationExtensions
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.SwitchableJson
    • IJsonConfigurationSourcePreparation
    • ISwitchableJsonConfiguration
    • JsonConfigurationCandidatePreparation
    • JsonConfigurationCandidatePreparations
    • JsonConfigurationSourcePreparationContext
    • JsonConfigurationSourcePreparationException
    • JsonConfigurationValueProtection
    • SwitchableJsonConfigurationEventArgs
    • SwitchableJsonConfigurationEventKind
    • SwitchableJsonConfigurationExtensions
    • SwitchableJsonFailureKind
    • SwitchableJsonPreparationStatus
    • SwitchableJsonRegistrationOptions
    • SwitchableJsonRuntimeFailurePolicy
    • SwitchableJsonSwitchPreparation
    • SwitchableJsonSwitchResult
    • SwitchableJsonSwitchStatus
  • Eigenverft.NetLib.Infrastructure.Hosting.Configuration.Values
    • ConfigurationValueCodec
    • ConfigurationValueCodecs
    • ConfigurationValueKind
    • JsonConfigurationFileEncoder
  • Eigenverft.NetLib.Infrastructure.Hosting.DirectoryLayout
    • AppDirectoryLayout
    • AppDirectoryLayoutFactory
    • DefaultDirectory
    • DefaultDirectoryExtensions
    • DefaultDirectoryNameAttribute
    • HostApplicationBuilderDirectoryLayoutExtensions
    • HostApplicationBuilderFactory
    • IAppDirectoryLayout
  • Eigenverft.NetLib.Infrastructure.Hosting.Logging.BootstrapLogger
    • BootstrapLogger
    • BootstrapLogger<TCategoryName>
  • Eigenverft.NetLib.Infrastructure.Security.Certificates
    • CertificateKeyProfile
    • CertificatePurpose
    • CertificateRecoveryMode
    • CertificateSubject
    • ManagedCertificateAction
    • ManagedCertificateFile
    • ManagedCertificateFileOptions
    • ManagedCertificateResult
    • SelfSignedCertificateFactory
    • SelfSignedCertificateOptions
  • Eigenverft.NetLib.Infrastructure.Security.MachineBinding
    • PhysicalMachineBinding
  • Eigenverft.NetLib.Infrastructure.Text
    • Base92JsonSafeEncoder
  • Eigenverft.NetLib.Infrastructure.Transformations
    • ReversibleStringTransform
    • ReversibleStringTransform.TryReverseDelegate
    • ReversibleStringTransforms

Class SwitchableJsonSwitchPreparation

Represents one completed source-switch preparation that can later be committed or aborted.

Inheritance
object
SwitchableJsonSwitchPreparation
Implements
IDisposable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Eigenverft.NetLib.Infrastructure.Hosting.Configuration.SwitchableJson
Assembly: Eigenverft.NetLib.Infrastructure.dll
Syntax
public sealed class SwitchableJsonSwitchPreparation : IDisposable
Remarks

A preparation is bound to the provider state that existed when it was created. Commit rejects the preparation if that state changed in the meantime. Dispose aborts an uncommitted preparation and releases any prepared watcher resources. The object is single-use: after Commit or Abort it cannot be committed again.

Properties

| Edit this page View Source

CanCommit

Gets whether this preparation completed successfully and is eligible for Commit.

Declaration
public bool CanCommit { get; }
Property Value
Type Description
bool
| Edit this page View Source

ConfigurationChanged

Gets whether the prepared candidate differs from the effective provider snapshot it was compared against.

Declaration
public bool ConfigurationChanged { get; }
Property Value
Type Description
bool
| Edit this page View Source

Exception

Gets the underlying prepare exception for rejected preparations, when available.

Declaration
public Exception? Exception { get; }
Property Value
Type Description
Exception
| Edit this page View Source

FailureKind

Gets the classified prepare failure, or None.

Declaration
public SwitchableJsonFailureKind FailureKind { get; }
Property Value
Type Description
SwitchableJsonFailureKind
| Edit this page View Source

Name

Gets the caller-defined provider identity.

Declaration
public string Name { get; }
Property Value
Type Description
string
| Edit this page View Source

PreviousSourcePath

Gets the source path that was active when preparation started.

Declaration
public string PreviousSourcePath { get; }
Property Value
Type Description
string
| Edit this page View Source

RequestedSourcePath

Gets the normalized candidate source path.

Declaration
public string RequestedSourcePath { get; }
Property Value
Type Description
string
| Edit this page View Source

Status

Gets the completed prepare outcome.

Declaration
public SwitchableJsonPreparationStatus Status { get; }
Property Value
Type Description
SwitchableJsonPreparationStatus
| Edit this page View Source

Timestamp

Gets the UTC timestamp at which preparation completed.

Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type Description
DateTimeOffset

Methods

| Edit this page View Source

Abort()

Discards this preparation without changing the active provider state.

Declaration
public void Abort()
Remarks

Abort is idempotent and emits no lifecycle or IConfiguration reload signal.

| Edit this page View Source

Commit()

Atomically publishes this preparation if the provider still matches the state against which it was prepared.

Declaration
public SwitchableJsonSwitchResult Commit()
Returns
Type Description
SwitchableJsonSwitchResult

The completed source-switch result.

Remarks

A stale preparation returns a rejected switch result with StalePreparation. Prepared Commit is intentionally result-driven and does not apply Throw; that policy remains part of the one-step TrySwitch API.

| Edit this page View Source

Dispose()

Aborts an uncommitted preparation.

Declaration
public void Dispose()

Implements

IDisposable
  • Edit this page
  • View Source
In this article
Back to top