Прочетете на английски Редактиране

Споделяне чрез


GrainExtensions.GetPrimaryKey Method

Definition

Overloads

GetPrimaryKey(IAddressable, String)

Returns the Guid representation of a grain primary key.

GetPrimaryKey(IGrain, String)
GetPrimaryKey(IGrain)
GetPrimaryKey(IAddressable)

Returns the Guid representation of a grain primary key.

GetPrimaryKey(IAddressable, String)

Source:
GrainExtensions.cs

Returns the Guid representation of a grain primary key.

C#
public static Guid GetPrimaryKey(this Orleans.Runtime.IAddressable grain, out string keyExt);

Parameters

grain
IAddressable

The grain to find the primary key for.

keyExt
String

The output parameter to return the extended key part of the grain primary key, if extended primary key was provided for that grain.

Returns

A Guid representing the primary key for this grain.

Exceptions

The provided grain does not have a Guid-based key.

Applies to

.NET Orleans 9.0.0 и други версии
Продукт Версии
.NET Orleans 1.5.10, 3.4.5, 3.6.0, 7.0.0, 8.0.0, 8.1.0, 8.2.0, 9.0.0

GetPrimaryKey(IGrain, String)

Source:
GrainExtensions.cs
C#
public static Guid GetPrimaryKey(this Orleans.IGrain grain, out string keyExt);

Parameters

grain
IGrain
keyExt
String

Returns

Applies to

.NET Orleans 3.6.0 и други версии
Продукт Версии
.NET Orleans 1.5.10, 3.4.5, 3.6.0

GetPrimaryKey(IGrain)

Source:
GrainExtensions.cs
C#
public static Guid GetPrimaryKey(this Orleans.IGrain grain);

Parameters

grain
IGrain

Returns

Applies to

.NET Orleans 3.6.0 и други версии
Продукт Версии
.NET Orleans 1.5.10, 3.4.5, 3.6.0

GetPrimaryKey(IAddressable)

Source:
GrainExtensions.cs

Returns the Guid representation of a grain primary key.

C#
public static Guid GetPrimaryKey(this Orleans.Runtime.IAddressable grain);

Parameters

grain
IAddressable

The grain to find the primary key for.

Returns

A Guid representing the primary key for this grain.

Exceptions

The provided grain does not have a Guid-based key.

Applies to

.NET Orleans 9.0.0 и други версии
Продукт Версии
.NET Orleans 1.5.10, 3.4.5, 3.6.0, 7.0.0, 8.0.0, 8.1.0, 8.2.0, 9.0.0