Skip to content
Docs Try Aspire

IDeploymentStateManager Methods

Interface Methods 2 members
Provides deployment state management functionality.
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))
{
// ...
}
}
sectionName string The name of the section to acquire (e.g., "Parameters", "Azure").
cancellationToken CancellationToken optional The cancellation token.
Task<DeploymentStateSection> A StateSection containing the section data and version information.
SaveSectionAsync(DeploymentStateSection, CancellationToken) Section titled SaveSectionAsync(DeploymentStateSection, CancellationToken) abstract Task
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))
{
// ...
}
}
section DeploymentStateSection The section to save, including version information.
cancellationToken CancellationToken optional The cancellation token.
InvalidOperationException Thrown when a version conflict is detected, indicating the section was modified after it was acquired.