Skip to content

InProcessTestCluster.TryGetGrainContext(GrainId, IGrainContext?)

TryGetGrainContext(GrainId, IGrainContext?)

View source
public bool TryGetGrainContext(GrainId grainId, out IGrainContext? grainContext)
Attempts to find the IGrainContext for the grain with the specified grainId by searching all silos in the cluster.

Parameters

grainIdGrainId
The ID of the grain to find.
grainContextIGrainContext?
When this method returns, contains the grain context if found; otherwise, null.

Returns

true if the grain was found in one of the silos; otherwise, false.