IDeploymentStateManager Methods
InterfaceMethods5 members
Provides deployment state management functionality.
AcquireCurrentSectionAsync(string, CancellationToken)Section titled AcquireCurrentSectionAsync(string, CancellationToken)virtualTask<DeploymentStateSection> Acquires a specific section from the current deployment state without falling back to legacy state.
public interface IDeploymentStateManager{ public virtual Task<DeploymentStateSection> AcquireCurrentSectionAsync( string sectionName, CancellationToken cancellationToken = default(CancellationToken)) { // ... }}Parameters
sectionNamestringThe name of the section to acquire (e.g., "Parameters", "Azure").cancellationTokenCancellationTokenoptionalThe cancellation token.Returns
Task<DeploymentStateSection>A StateSection containing the current section data and version information.Remarks
Implementations that support legacy-state fallback must override this member. The default is provided for compatibility with state managers whose
IDeploymentStateManager.AcquireSectionAsync already reads only current state. AcquireSectionAsync(string, CancellationToken)Section titled AcquireSectionAsync(string, CancellationToken)abstractTask<DeploymentStateSection> Acquires a specific section of the deployment state with version tracking for concurrency control. The returned section is an immutable snapshot of the data at the time of acquisition.
public interface IDeploymentStateManager{ public abstract Task<DeploymentStateSection> AcquireSectionAsync( string sectionName, CancellationToken cancellationToken = default(CancellationToken)) { // ... }}Parameters
sectionNamestringThe name of the section to acquire (e.g., "Parameters", "Azure").cancellationTokenCancellationTokenoptionalThe cancellation token.Returns
Task<DeploymentStateSection>A StateSection containing the section data and version information.ClearAllStateAsync(CancellationToken)Section titled ClearAllStateAsync(CancellationToken)abstractTask Clears all deployment state, removing all sections and the underlying storage.
public interface IDeploymentStateManager{ public abstract Task ClearAllStateAsync( CancellationToken cancellationToken = default(CancellationToken)) { // ... }}Parameters
cancellationTokenCancellationTokenoptionalThe cancellation token.DeleteSectionAsync(DeploymentStateSection, CancellationToken)Section titled DeleteSectionAsync(DeploymentStateSection, CancellationToken)abstractTask Delete a section of deployment state with optimistic concurrency control. The section must have a matching version number or a concurrency exception will be thrown.
public interface IDeploymentStateManager{ public abstract Task DeleteSectionAsync( DeploymentStateSection section, CancellationToken cancellationToken = default(CancellationToken)) { // ... }}Parameters
sectionDeploymentStateSectionThe section to delete, including version information.cancellationTokenCancellationTokenoptionalThe cancellation token.Exceptions
InvalidOperationExceptionThrown when a version conflict is detected, indicating the section was modified after it was acquired.SaveSectionAsync(DeploymentStateSection, CancellationToken)Section titled SaveSectionAsync(DeploymentStateSection, CancellationToken)abstractTask Saves a section of deployment state with optimistic concurrency control. The section must have a matching version number or a concurrency exception will be thrown.
public interface IDeploymentStateManager{ public abstract Task SaveSectionAsync( DeploymentStateSection section, CancellationToken cancellationToken = default(CancellationToken)) { // ... }}Parameters
sectionDeploymentStateSectionThe section to save, including version information.cancellationTokenCancellationTokenoptionalThe cancellation token.Exceptions
InvalidOperationExceptionThrown when a version conflict is detected, indicating the section was modified after it was acquired.