Skip to content

GrainTypeSharedContext Methods

Functionality which is shared between all instances of a grain type.

AddActivationSetup(Action<IGrainContext>)

View source
public void AddActivationSetup(Action<IGrainContext> setup)
Adds a synchronous setup action to run for each activation of this grain type.

Parameters

setupAction<IGrainContext>
The setup action.

Exceptions

System.ArgumentNullException
setup is null.
System.InvalidOperationException
Shared grain type configuration has completed.

GetComponent(Type)

View source
public object? GetComponent(Type componentType)
Gets a component.

Parameters

componentTypeType
The type of the component.

Returns

The component with the specified type.