Skip to content

IGrainReferenceRuntime Methods

Runtime logic for GrainReferences to be usable. This service is not meant to be used directly by user code.

Cast(IAddressable, Type)

abstract
public abstract object Cast(IAddressable grain, Type interfaceType)
Converts the provided grain to the provided interfaceType.

Parameters

grainIAddressable
The grain.
interfaceTypeType
The resulting interface type.

Returns

A reference to grain which implements interfaceType.

InvokeMethod(GrainReference, IInvokable, InvokeMethodOptions)

abstract
public abstract void InvokeMethod(GrainReference reference, IInvokable request, InvokeMethodOptions options)
Invokes the specified void-returning method on the provided grain interface without waiting for a response.

Parameters

referenceGrainReference
The grain reference.
requestIInvokable
The method description.
optionsInvokeMethodOptions
The invocation options.

InvokeMethodAsync(GrainReference, IInvokable, InvokeMethodOptions)

abstract
public abstract ValueTask InvokeMethodAsync(GrainReference reference, IInvokable request, InvokeMethodOptions options)
Invokes the specified method on the provided grain interface.

Parameters

referenceGrainReference
The grain reference.
requestIInvokable
The method description.
optionsInvokeMethodOptions
The invocation options.

Returns

A System.Threading.Tasks.ValueTask representing the operation

InvokeMethodAsync(GrainReference, IInvokable, InvokeMethodOptions)

abstract
public abstract ValueTask<T> InvokeMethodAsync<T>(GrainReference reference, IInvokable request, InvokeMethodOptions options)
Invokes the specified method on the provided grain interface.

Parameters

referenceGrainReference
The grain reference.
requestIInvokable
The method description.
optionsInvokeMethodOptions
The invocation options.

Returns

The result of invocation.