Grain
class
Namespace: Orleans
The abstract base class for all grain classes.
public abstract class Grain : IGrainBase, IAddressableProperties
GrainContextGets the grain context.GrainReferenceIdentityStringString representation of grain's SiloIdentity including type and primary key.RuntimeIdentityA unique identifier for the current silo. There is no semantic content to this string, but it may be useful for logging.
Methods
OnActivateAsync(CancellationToken)This method is called at the end of the process of activating a grain. It is called before any messages have been dispatched to the grain. For grains with declared persistent state, this method is called after the State property has been populated.OnDeactivateAsync(DeactivationReason, CancellationToken)This method is called at the beginning of the process of deactivating a grain.
