# CollectionAgeLimitAttribute

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

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

```csharp
public class CollectionAgeLimitAttribute : Attribute, IGrainPropertiesProviderAttribute
```

Specifies the period of inactivity before a grain is available for collection and deactivation.

## Constructors

- [CollectionAgeLimitAttribute](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.collectionagelimitattribute/constructors/constructor-a9765cf1/)
- [CollectionAgeLimitAttribute(string)](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.collectionagelimitattribute/constructors/constructor-string-2340eda5/)

## Properties

- [AgeLimit](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.collectionagelimitattribute/properties/agelimit-0fbe7d69/)
- [AlwaysActive](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.collectionagelimitattribute/properties/alwaysactive-36e67bbf/)
- [Days](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.collectionagelimitattribute/properties/days-0eaeb74c/)
- [Hours](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.collectionagelimitattribute/properties/hours-f16d44c2/)
- [Minutes](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.collectionagelimitattribute/properties/minutes-fc46f740/)

## Methods

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

## Fields

- [MinAgeLimit](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.collectionagelimitattribute/fields/minagelimit-a22395a3/)
