Class BlockUpgradeVote
Fields relating to voting for a protocol upgrade.
Inheritance
Implements
Inherited Members
Namespace: Algorand.V2.Model
Assembly: Algorand.dll
Syntax
[DataContract]
public class BlockUpgradeVote : IEquatable<BlockUpgradeVote>, IValidatableObject
Constructors
| Improve this Doc View SourceBlockUpgradeVote(Nullable<Boolean>, Nullable<Int64>, String)
Initializes a new instance of the BlockUpgradeVote class.
Declaration
public BlockUpgradeVote(bool? upgradeApprove = default(bool? ), long? upgradeDelay = default(long? ), string upgradePropose = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Boolean> | upgradeApprove | \[upgradeyes\] Indicates a yes vote for the current proposal.. |
System.Nullable<System.Int64> | upgradeDelay | \[upgradedelay\] Indicates the time between acceptance and execution.. |
System.String | upgradePropose | \[upgradeprop\] Indicates a proposed upgrade.. |
Properties
| Improve this Doc View SourceUpgradeApprove
\[upgradeyes\] Indicates a yes vote for the current proposal.
Declaration
[DataMember(Name = "upgrade-approve", EmitDefaultValue = false)]
public bool? UpgradeApprove { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | \[upgradeyes\] Indicates a yes vote for the current proposal. |
UpgradeDelay
\[upgradedelay\] Indicates the time between acceptance and execution.
Declaration
[DataMember(Name = "upgrade-delay", EmitDefaultValue = false)]
public long? UpgradeDelay { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> | \[upgradedelay\] Indicates the time between acceptance and execution. |
UpgradePropose
\[upgradeprop\] Indicates a proposed upgrade.
Declaration
[DataMember(Name = "upgrade-propose", EmitDefaultValue = false)]
public string UpgradePropose { get; set; }
Property Value
Type | Description |
---|---|
System.String | \[upgradeprop\] Indicates a proposed upgrade. |
Methods
| Improve this Doc View SourceEquals(BlockUpgradeVote)
Returns true if BlockUpgradeVote instances are equal
Declaration
public bool Equals(BlockUpgradeVote input)
Parameters
Type | Name | Description |
---|---|---|
BlockUpgradeVote | input | Instance of BlockUpgradeVote to be compared |
Returns
Type | Description |
---|---|
System.Boolean | Boolean |
Equals(Object)
Returns true if objects are equal
Declaration
public override bool Equals(object input)
Parameters
Type | Name | Description |
---|---|---|
System.Object | input | Object to be compared |
Returns
Type | Description |
---|---|
System.Boolean | Boolean |
Overrides
GetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code |
Overrides
ToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
Type | Description |
---|---|
System.String | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String presentation of the object |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIValidatableObject.Validate(ValidationContext)
To validate all properties of the instance
Declaration
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.DataAnnotations.ValidationContext | validationContext | Validation context |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> | Validation Result |