Düzenle

Aracılığıyla paylaş


GrainExtensions.AsReference Method

Definition

Overloads

AsReference(IAddressable, Type)

Returns a typed reference to the provided grain.

AsReference<TGrainInterface>(IAddressable)

Returns a typed reference to the provided grain.

AsReference(IAddressable, Type)

Returns a typed reference to the provided grain.

public static object AsReference (this Orleans.Runtime.IAddressable grain, Type interfaceType);
static member AsReference : Orleans.Runtime.IAddressable * Type -> obj
<Extension()>
Public Function AsReference (grain As IAddressable, interfaceType As Type) As Object

Parameters

grain
IAddressable

The grain to convert.

interfaceType
Type

The type of the grain interface.

Returns

A strongly typed reference to the provided grain which implements interfaceType.

Remarks

If the provided value is a grain instance, this will create a reference which implements the provided interface. If the provided value is already grain reference, this will create a new reference which implements the provided interface.

Applies to

AsReference<TGrainInterface>(IAddressable)

Source:
GrainExtensions.cs

Returns a typed reference to the provided grain.

public static TGrainInterface AsReference<TGrainInterface> (this Orleans.Runtime.IAddressable grain);
static member AsReference : Orleans.Runtime.IAddressable -> 'GrainInterface
<Extension()>
Public Function AsReference(Of TGrainInterface) (grain As IAddressable) As TGrainInterface

Type Parameters

TGrainInterface

The type of the grain interface.

Parameters

grain
IAddressable

The grain to convert.

Returns

TGrainInterface

A strongly typed reference to the provided grain which implements TGrainInterface.

Remarks

If the provided value is a grain instance, this will create a reference which implements the provided interface. If the provided value is already grain reference, this will create a new reference which implements the provided interface.

Applies to