Skip to content

DurableVersion

class

Namespace: Orleans.Durable.Tasks

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.
public sealed class DurableVersion

Remarks

Declare each change once, typically as a static field, and read the running execution's version with DurableVersion wherever the code branches on the change: static readonly DurableVersion CarrierApi = new("carrier-api", minSupported: 0, maxSupported: 1);. Every check then states the same range, so a deployment which adds a version or retires one edits the declaration.

DurableVersion returns what DurableTask returns for the declared name and range.

Constructors

Properties

  • MaxSupportedGets the newest version, which executions that reach a check for the first time record.
  • MinSupportedGets the oldest version which the code supports.
  • NameGets the change's name.

Methods

  • GetReturns the version of this change which the running durable task follows.
  • IsAtLeast(int)Returns whether the running durable task follows version of this change or a newer one.
  • ToStringReturns a string that represents the current object.