Skip to content
DocsTry Aspire
DocsTry

EnvironmentCallbackContext Properties

ClassProperties5 members
Represents a callback context for environment variables associated with a publisher.
CancellationTokenSection titled CancellationTokenCancellationToken
Gets the CancellationToken associated with the callback context.
public CancellationToken CancellationToken { get; }
EnvironmentVariablesSection titled EnvironmentVariablesDictionary<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; }
InvalidOperationExceptionThrown when the EnvironmentCallbackContext was created without a specified resource.
This will be set to the resource in all cases where Aspire invokes the callback.