Skip to content
DocsTry Aspire
DocsTry

CustomResourceExtensions Methods

ClassMethods1 member
Extension methods for applying dashboard annotations to resources.
WithInitialState(IResourceBuilder<TResource>, CustomResourceSnapshot)Section titled WithInitialState(IResourceBuilder<TResource>, CustomResourceSnapshot)extensionIResourceBuilder<TResource>
Initializes the resource with the initial snapshot.
public static class CustomResourceExtensions
{
public static IResourceBuilder<TResource> WithInitialState<TResource>(
this IResourceBuilder<TResource> builder,
CustomResourceSnapshot initialSnapshot)
{
// ...
}
}
builderIResourceBuilder<TResource>The resource builder.
initialSnapshotCustomResourceSnapshotThe factory to create the initial CustomResourceSnapshot for this resource.
IResourceBuilder<TResource>The resource builder.
This method is not available in polyglot app hosts.