Condividi tramite


ResourceNameAttribute Class

Definition

Signifies that a parameter represents a resource name.

Decorate String parameters representing resource names with this attribute, e.g.:

public static IResourceBuilder<MyResource> AddCustomResource(this IDistributedApplicationBuilder builder, [ResourceName] string name)

[System.AttributeUsage(System.AttributeTargets.Parameter, AllowMultiple=false)]
public sealed class ResourceNameAttribute : Attribute, Aspire.Hosting.ApplicationModel.IModelNameParameter
[<System.AttributeUsage(System.AttributeTargets.Parameter, AllowMultiple=false)>]
type ResourceNameAttribute = class
    inherit Attribute
    interface IModelNameParameter
Public NotInheritable Class ResourceNameAttribute
Inherits Attribute
Implements IModelNameParameter
Inheritance
ResourceNameAttribute
Attributes
Implements

Remarks

This API supports analyzers in Aspire.Hosting.Analyzers.

Constructors

ResourceNameAttribute()

Applies to