Show / Hide Table of Contents

Class GrainReference

This is the base class for all typed grain references.

Inheritance
System.Object
GrainReference
Implements
IAddressable
IEquatable<GrainReference>
ISerializable
Namespace: Orleans.Runtime
Assembly: Orleans.Core.Abstractions.dll
Syntax
public class GrainReference : object, IAddressable, IEquatable<GrainReference>, ISerializable

Constructors

| Improve this Doc View Source

GrainReference(GrainReference)

Constructs a copy of a grain reference.

Declaration
protected GrainReference(GrainReference other)
Parameters
Type Name Description
GrainReference other

The reference to copy.

| Improve this Doc View Source

GrainReference(GrainReference, InvokeMethodOptions)

Declaration
protected GrainReference(GrainReference other, InvokeMethodOptions invokeMethodOptions)
Parameters
Type Name Description
GrainReference other
InvokeMethodOptions invokeMethodOptions
| Improve this Doc View Source

GrainReference(SerializationInfo, StreamingContext)

Declaration
protected GrainReference(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context

Fields

| Improve this Doc View Source

SystemTargetSilo

Called from generated code.

Declaration
protected readonly SiloAddress SystemTargetSilo
Field Value
Type Description
SiloAddress

Properties

| Improve this Doc View Source

InterfaceId

Implemented by generated subclasses to return a constant Implemented in generated code.

Declaration
public virtual int InterfaceId { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

InterfaceName

Return the name of the interface for this GrainReference. Implemented in Orleans generated code.

Declaration
public virtual string InterfaceName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

InterfaceVersion

Implemented in generated code.

Declaration
public virtual ushort InterfaceVersion { get; }
Property Value
Type Description
System.UInt16
| Improve this Doc View Source

IsInitializedSystemTarget

Whether the runtime environment for system targets has been initialized yet. Called from generated code.

Declaration
protected bool IsInitializedSystemTarget { get; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Equals(GrainReference)

Declaration
public bool Equals(GrainReference other)
Parameters
Type Name Description
GrainReference other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Object)

Tests this reference for equality to another object. Two grain references are equal if they both refer to the same grain.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object to test for equality against this reference.

Returns
Type Description
System.Boolean

true if the object is equal to this reference.

| Improve this Doc View Source

GetHashCode()

Calculates a hash code for a grain reference.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
| Improve this Doc View Source

GetMethodName(Int32, Int32)

Return the method name associated with the specified interfaceId and methodId values.

Declaration
public virtual string GetMethodName(int interfaceId, int methodId)
Parameters
Type Name Description
System.Int32 interfaceId

Interface Id

System.Int32 methodId

Method Id

Returns
Type Description
System.String

Method name string.

| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context
| Improve this Doc View Source

GetUniformHashCode()

Get a uniform hash code for this grain reference.

Declaration
public uint GetUniformHashCode()
Returns
Type Description
System.UInt32
| Improve this Doc View Source

InvokeMethodAsync<T>(Int32, Object[], InvokeMethodOptions, SiloAddress)

Called from generated code.

Declaration
protected Task<T> InvokeMethodAsync<T>(int methodId, object[] arguments, InvokeMethodOptions options = default (InvokeMethodOptions), SiloAddress silo = null)
Parameters
Type Name Description
System.Int32 methodId
System.Object[] arguments
InvokeMethodOptions options
SiloAddress silo
Returns
Type Description
Task<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

InvokeOneWayMethod(Int32, Object[], InvokeMethodOptions, SiloAddress)

Called from generated code.

Declaration
protected void InvokeOneWayMethod(int methodId, object[] arguments, InvokeMethodOptions options = default (InvokeMethodOptions), SiloAddress silo = null)
Parameters
Type Name Description
System.Int32 methodId
System.Object[] arguments
InvokeMethodOptions options
SiloAddress silo
| Improve this Doc View Source

IsCompatible(Int32)

Implemented in generated code.

Declaration
public virtual bool IsCompatible(int interfaceId)
Parameters
Type Name Description
System.Int32 interfaceId
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ToKeyString()

Get the key value for this grain, as a string.

Declaration
public string ToKeyString()
Returns
Type Description
System.String
| Improve this Doc View Source

ToString()

Returns a string representation of this reference.

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

| Improve this Doc View Source

Equality(GrainReference, GrainReference)

Compares two references for equality. Two grain references are equal if they both refer to the same grain.

Declaration
public static bool operator ==(GrainReference reference1, GrainReference reference2)
Parameters
Type Name Description
GrainReference reference1

First grain reference to compare.

GrainReference reference2

Second grain reference to compare.

Returns
Type Description
System.Boolean

true if both grain references refer to the same grain (by grain identifier).

| Improve this Doc View Source

Inequality(GrainReference, GrainReference)

Compares two references for inequality. Two grain references are equal if they both refer to the same grain.

Declaration
public static bool operator !=(GrainReference reference1, GrainReference reference2)
Parameters
Type Name Description
GrainReference reference1

First grain reference to compare.

GrainReference reference2

Second grain reference to compare.

Returns
Type Description
System.Boolean

false if both grain references are resolved to the same grain (by grain identifier).

Implements

IAddressable
IEquatable<>
ISerializable

Extension Methods

ImmutableExt.AsImmutable<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX