# GrainDirectoryAttribute

Package: [Microsoft.Orleans.Core.Abstractions](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/) 10.0.0

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Core.Abstractions) | [Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/GrainDirectory/GrainDirectoryAttribute.cs#L12)

```csharp
public sealed class GrainDirectoryAttribute : Attribute, IGrainPropertiesProviderAttribute
```

Specifies the name of the grain directory provider to use for the grain class which this attribute is applied to.

## Constructors

- [GrainDirectoryAttribute](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graindirectory.graindirectoryattribute/constructors/constructor-dfd63881/)
- [GrainDirectoryAttribute(string)](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graindirectory.graindirectoryattribute/constructors/constructor-string-eefa4f03/)

## Properties

- [GrainDirectoryName](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graindirectory.graindirectoryattribute/properties/graindirectoryname-44b11896/)

## Methods

- [Populate(IServiceProvider, Type, GrainType, Dictionary&lt;string, string&gt;)](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graindirectory.graindirectoryattribute/methods/populate-system-iserviceprovider-system-type-orleans-runtime-graintype-system-co-b0f6b4e0/)

## Fields

- [DEFAULT_GRAIN_DIRECTORY](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.graindirectory.graindirectoryattribute/fields/default-grain-directory-791a5645/)
