Skip to content

DurableVersion Methods

Describes a change to durable task code whose versions coexist while executions which started on earlier code are pending: its name, and the versions which the running code supports.

Get

View source
public int Get()
Returns the version of this change which the running durable task follows.

Returns

A version from DurableVersion to DurableVersion.

Exceptions

Orleans.Durable.Tasks.DurableTaskAttemptCanceledException
The host canceled the attempt, for example because the execution recorded a version outside the supported range, which stalls it; the exception's inner exception is then a DurableTaskVersionException.
System.InvalidOperationException
The host can't record the version from the calling code, for example after ConfigureAwait(false).

IsAtLeast(int)

View source
public bool IsAtLeast(int version)
Returns whether the running durable task follows version of this change or a newer one.

Parameters

versionint
The version which introduced the behavior which the caller selects.

Returns

true when DurableVersion returns version or more.

Exceptions

Orleans.Durable.Tasks.DurableTaskAttemptCanceledException
The host canceled the attempt, for example because the execution recorded a version outside the supported range, which stalls it; the exception's inner exception is then a DurableTaskVersionException.

ToString

override
View source
public override string ToString()
Returns a string that represents the current object.

Returns

A string that represents the current object.