Skip to content
Docs Try Aspire

EnvironmentCallbackContext Properties

Class Properties 5 members
Represents a callback context for environment variables associated with a publisher.
CancellationToken Section titled CancellationToken CancellationToken
Gets the CancellationToken associated with the callback context.
public CancellationToken CancellationToken { get; }
EnvironmentVariables Section titled EnvironmentVariables Dictionary<string, object>
Gets the environment variables associated with the callback context.
public Dictionary<string, object> EnvironmentVariables { get; }
Gets the execution context associated with this invocation of the AppHost.
public DistributedApplicationExecutionContext ExecutionContext { get; }
An optional logger to use for logging.
public ILogger Logger { get; set; }
The resource associated with this callback context.
public IResource Resource { get; }
InvalidOperationException Thrown when the EnvironmentCallbackContext was created without a specified resource.
This will be set to the resource in all cases where .NET Aspire invokes the callback.