ManifestPublishingContext Methods
Class Methods 7 members
Contextual information used for manifest publishing during this execution of the AppHost.
Generates a relative path based on the location of the manifest path.
public sealed class ManifestPublishingContext{ public string? GetManifestRelativePath( string? path) { // ... }}Parameters
path string? A path to a file. Returns
string? The specified path as a relative path to the manifest. Exceptions
DistributedApplicationException Throws when could not get the directory directory name from the output path. TryAddDependentResources(object?) Section titled TryAddDependentResources(object?) Ensures that any
IResource instances referenced by value are written to the manifest. public sealed class ManifestPublishingContext{ public void TryAddDependentResources( object? value) { // ... }}Parameters
value object? The object to check for references that may be resources that need to be written. WriteBindings(IResource) Section titled WriteBindings(IResource) Writes endpoints to the resource entry in the manifest based on the resource's
EndpointAnnotation entries in the IResource.Annotations collection. public sealed class ManifestPublishingContext{ public void WriteBindings( IResource resource) { // ... }}Parameters
resource IResource The IResource that contains EndpointAnnotation annotations. WriteCommandLineArgumentsAsync(IResource) Section titled WriteCommandLineArgumentsAsync(IResource) Task Writes command line arguments to the manifest based on the
IResource resource's CommandLineArgsCallbackAnnotation annotations. public sealed class ManifestPublishingContext{ public Task WriteCommandLineArgumentsAsync( IResource resource) { // ... }}Parameters
resource IResource The IResource that contains CommandLineArgsCallbackAnnotation annotations. Returns
Task The Tasks.Task to await for completion. WriteConnectionString(IResource) Section titled WriteConnectionString(IResource) Writes the "connectionString" field for the underlying resource.
public sealed class ManifestPublishingContext{ public void WriteConnectionString( IResource resource) { // ... }} Writes JSON elements to the manifest which represent a container resource.
public sealed class ManifestPublishingContext{ public Task WriteContainerAsync( ContainerResource container) { // ... }}Parameters
container ContainerResource The container resource to written to the manifest. Exceptions
DistributedApplicationException Thrown if the container resource does not contain a ContainerImageAnnotation. WriteEnvironmentVariablesAsync(IResource) Section titled WriteEnvironmentVariablesAsync(IResource) Task Writes environment variables to the manifest base on the
IResource resource's EnvironmentCallbackAnnotation annotations."/> public sealed class ManifestPublishingContext{ public Task WriteEnvironmentVariablesAsync( IResource resource) { // ... }}Parameters
resource IResource The IResource which contains EnvironmentCallbackAnnotation annotations.