Skip to content
DocsTry Aspire
DocsTry

ContainerRegistryResource Constructors

ClassConstructors1 member
Represents a general-purpose container registry resource that can be used to reference external container registries (e.g., Docker Hub, GitHub Container Registry, or private registries) in the application model.
Constructor(string, ReferenceExpression, ReferenceExpression?)Section titled Constructor(string, ReferenceExpression, ReferenceExpression?)
Initializes a new instance of the ContainerRegistryResource class.
public class ContainerRegistryResource
{
public ContainerRegistryResource(
string name,
ReferenceExpression endpoint,
ReferenceExpression? repository = null)
{
// ...
}
}
namestringThe name of the resource.
endpointReferenceExpressionThe endpoint URL or hostname of the container registry.
repositoryReferenceExpression?optionalThe optional repository path within the container registry.
ArgumentNullExceptionThrown when endpoint is null.