# DaprComponentReferenceAnnotation Constructors

- Package: [CommunityToolkit.Aspire.Hosting.Dapr](/reference/api/csharp/communitytoolkit.aspire.hosting.dapr.md)
- Type: [DaprComponentReferenceAnnotation](/reference/api/csharp/communitytoolkit.aspire.hosting.dapr/daprcomponentreferenceannotation.md)
- Kind: `Constructors`
- Members: `1`

Indicates that a Dapr component should be used with the sidecar for the associated resource.

## DaprComponentReferenceAnnotation(IDaprComponentResource)

- Name: `Constructor(IDaprComponentResource)`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/30a4b632065206d447183d2baabf6dfb3678d4af/src/CommunityToolkit.Aspire.Hosting.Dapr/DaprComponentReferenceAnnotation.cs#L12)

Indicates that a Dapr component should be used with the sidecar for the associated resource.

```csharp
public record DaprComponentReferenceAnnotation
{
    public DaprComponentReferenceAnnotation(
        IDaprComponentResource Component)
    {
        // ...
    }
}
```

## Parameters

- `Component` ([IDaprComponentResource](/reference/api/csharp/communitytoolkit.aspire.hosting.dapr/idaprcomponentresource.md))
  The Dapr component to use.
