Skip to main content

UpgradePolicy

Namespace: IotaSdk

Representation of upgrade policy constants in iota::package.

public class UpgradePolicy : IUpgradePolicy, System.IEquatable`1[[IotaSdk.UpgradePolicy, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.IDisposable

Inheritance Object → UpgradePolicy
Implements IUpgradePolicy, IEquatable<UpgradePolicy>, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors​

UpgradePolicy(UInt64)​

public UpgradePolicy(ulong pointer)

Parameters​

pointer UInt64

Methods​

Destroy()​

public void Destroy()

Dispose()​

public void Dispose()

AsU8()​

Returns the internal representation.

public byte AsU8()

Returns​

Byte

ToDisplayString()​

Render this type as human-readable text.

Some types also print this through the binding's native string conversion; this method is the spelling every object type has.

The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.

public string ToDisplayString()

Returns​

String

ToString()​

public override string ToString()

Returns​

String

Equals(UpgradePolicy)​

public bool Equals(UpgradePolicy? other)

Parameters​

other UpgradePolicy?

Returns​

Boolean

Equals(Object)​

public override bool Equals(object? obj)

Parameters​

obj Object?

Returns​

Boolean

Additive()​

Allows adding new functionalities (e.g., new public functions or structs) but restricts changes to existing functionalities.

public static UpgradePolicy Additive()

Returns​

UpgradePolicy

Compatible()​

The least restrictive policy. Permits changes to all function implementations, the removal of ability constraints on generic type parameters in function signatures, and modifications to private, public(friend), and entry function signatures. However, public function signatures and existing types cannot be changed.

public static UpgradePolicy Compatible()

Returns​

UpgradePolicy

DepOnly()​

Limits modifications to the package’s dependencies only.

public static UpgradePolicy DepOnly()

Returns​

UpgradePolicy