Skip to content

IGrainContext Properties

Represents a grain from the perspective of the runtime.

ActivationId

abstractget
public abstract ActivationId ActivationId
Gets the activation id.

ActivationServices

abstractget
public abstract IServiceProvider ActivationServices
Gets the System.IServiceProvider that provides access to the grain activation's service container.

Address

abstractget
public abstract GrainAddress Address
Gets the activation address.

Deactivated

abstractget
public abstract Task Deactivated
Gets the System.Threading.Tasks.Task which completes when the grain has deactivated.

GrainId

abstractget
public abstract GrainId GrainId
Gets the grain identity.

GrainInstance

abstractget
public abstract object? GrainInstance
Gets the grain instance, or null if the grain instance has not been set yet.

GrainReference

abstractget
public abstract GrainReference GrainReference
Gets a reference to this grain.

ObservableLifecycle

abstractget
public abstract IGrainLifecycle ObservableLifecycle
Gets the observable Grain lifecycle, which can be used to add lifecycle hooks.

Scheduler

abstractget
public abstract IWorkItemScheduler Scheduler
Gets the scheduler.