ManifestPublishingContext
Class sealed net10.0
Contextual information used for manifest publishing during this execution of the AppHost.
namespace Aspire.Hosting.Publishing;
public sealed class ManifestPublishingContext{ // ...} 12 members
Constructors1
Section titled ConstructorsProperties4
Section titled PropertiesCancellationTokengetCancellationToken Gets cancellation token for this operation.
ExecutionContextget Gets execution context for this invocation of the AppHost.
ManifestPathgetstring Gets manifest path specified for this invocation of the AppHost.
WritergetUtf8JsonWriter Gets JSON writer for writing manifest entries.
Methods7
Section titled MethodsGetManifestRelativePath(string?)string? Generates a relative path based on the location of the manifest path.
TryAddDependentResources(object?) Ensures that any
IResource instances referenced by value are written to the manifest. WriteBindings(IResource) Writes endpoints to the resource entry in the manifest based on the resource's
EndpointAnnotation entries in the IResource.Annotations collection. WriteCommandLineArgumentsAsync(IResource)Task Writes command line arguments to the manifest based on the
IResource resource's CommandLineArgsCallbackAnnotation annotations. WriteConnectionString(IResource) Writes the "connectionString" field for the underlying resource.
WriteContainerAsync(ContainerResource)Task Writes JSON elements to the manifest which represent a container resource.
WriteEnvironmentVariablesAsync(IResource)Task Writes environment variables to the manifest base on the
IResource resource's EnvironmentCallbackAnnotation annotations."/>