İngilizce dilinde oku Düzenle

Aracılığıyla paylaş


Grain Constructors

Definition

Overloads

Grain()

This constructor should never be invoked. We expose it so that client code (subclasses of Grain) do not have to add a constructor. Client code should use the GrainFactory property to get a reference to a Grain.

Grain(IGrainIdentity, IGrainRuntime)

Grain implementers do NOT have to expose this constructor but can choose to do so. This constructor is particularly useful for unit testing where test code can create a Grain and replace the IGrainIdentity and IGrainRuntime with test doubles (mocks/stubs).

Grain(IGrainContext, IGrainRuntime)

Grain implementers do NOT have to expose this constructor but can choose to do so. This constructor is particularly useful for unit testing where test code can create a Grain and replace the IGrainIdentity and IGrainRuntime with test doubles (mocks/stubs).

Grain()

Source:
Grain.cs

This constructor should never be invoked. We expose it so that client code (subclasses of Grain) do not have to add a constructor. Client code should use the GrainFactory property to get a reference to a Grain.

protected Grain();

Applies to

Grain(IGrainIdentity, IGrainRuntime)

Source:
Grain.cs

Grain implementers do NOT have to expose this constructor but can choose to do so. This constructor is particularly useful for unit testing where test code can create a Grain and replace the IGrainIdentity and IGrainRuntime with test doubles (mocks/stubs).

protected Grain(Orleans.Core.IGrainIdentity identity, Orleans.Runtime.IGrainRuntime runtime);

Parameters

identity
IGrainIdentity
runtime
IGrainRuntime

Applies to

Grain(IGrainContext, IGrainRuntime)

Grain implementers do NOT have to expose this constructor but can choose to do so. This constructor is particularly useful for unit testing where test code can create a Grain and replace the IGrainIdentity and IGrainRuntime with test doubles (mocks/stubs).

protected Grain(Orleans.Runtime.IGrainContext grainContext, Orleans.Runtime.IGrainRuntime? grainRuntime = default);

Parameters

grainContext
IGrainContext
grainRuntime
IGrainRuntime

Applies to