Struct ContractParameters
Concrete IContractParameters backed by a raw byte payload. Callers serialise their domain-specific parameters (e.g. via FlatBuffers, MessagePack, JSON) into the byte array and reconstruct them at the contract.
public readonly record struct ContractParameters : IContractParameters, IEquatable<IContractParameters>, IEquatable<ContractParameters>
- Implements
- Inherited Members
Remarks
This avoids a hard dependency on Virtufin.Data.Variant so that
Virtufin.Base remains usable even when higher-level serialisation
libraries are absent.
Constructors
ContractParameters(byte[])
Concrete IContractParameters backed by a raw byte payload. Callers serialise their domain-specific parameters (e.g. via FlatBuffers, MessagePack, JSON) into the byte array and reconstruct them at the contract.
public ContractParameters(byte[] Payload)
Parameters
Payloadbyte[]The serialised parameter bytes.
Remarks
This avoids a hard dependency on Virtufin.Data.Variant so that
Virtufin.Base remains usable even when higher-level serialisation
libraries are absent.
Properties
Empty
An empty parameter set.
public static ContractParameters Empty { get; }
Property Value
Payload
The serialised parameter bytes.
public byte[] Payload { get; init; }
Property Value
- byte[]
Methods
Equals(ContractParameters)
Custom equality: two ContractParameters are equal when their payloads have the same contents.
public bool Equals(ContractParameters other)
Parameters
otherContractParameters
Returns
Equals(IContractParameters?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(IContractParameters? other)
Parameters
otherIContractParametersAn object to compare with this object.
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.