# KeepAliveAttribute

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#L92)

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

When applied to a grain implementation type this attribute specifies that activations of the grain shouldn't be collected by the idle activation collector.

## Constructors

- [KeepAliveAttribute](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.keepaliveattribute/constructors/constructor-a21c2c01/)

## Methods

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