Table of Contents

Struct ContractParameters

Namespace
Virtufin.Base
Assembly
Virtufin.Base.dll

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

Payload byte[]

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

ContractParameters

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

other ContractParameters

Returns

bool

Equals(IContractParameters?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IContractParameters? other)

Parameters

other IContractParameters

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

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.