Skip to content
DocsTry Aspire
DocsTry

ConnectionPropertyAnnotation Constructors

ClassConstructors1 member
Annotation that creates a custom connection property value injected into environment variables when a resource is referenced using WithReference().
Constructor(string, ReferenceExpression)Section titled Constructor(string, ReferenceExpression)
Initializes a new instance of the ConnectionPropertyAnnotation class with the specified property name and reference expression.
public sealed class ConnectionPropertyAnnotation
{
public ConnectionPropertyAnnotation(
string name,
ReferenceExpression referenceExpression)
{
// ...
}
}
namestringThe name of the connection property to annotate. Cannot be null or empty.
referenceExpressionReferenceExpressionThe reference expression associated with the connection property. Cannot be null.