Skip to content

ExclusiveLockTransactionTestGrain Methods

The abstract base class for all grain classes.

Add(int)

View source
public Task<int[]> Add(int numberToAdd)
apply add operation to every transaction state

Parameters

numberToAddint

Get

View source
public Task<int[]> Get()
apply get operation to every transaction state with exclusive lock

OnActivateAsync(CancellationToken)

override
View source
public override Task OnActivateAsync(CancellationToken cancellationToken)
This method is called at the end of the process of activating a grain. It is called before any messages have been dispatched to the grain. For grains with declared persistent state, this method is called after the State property has been populated.

Parameters

cancellationTokenCancellationToken
A cancellation token which signals when activation is being canceled.

Set(int)

View source
public Task Set(int newValue)
apply set operation to every transaction state

Parameters

newValueint