Table of Contents

Class CurrencyPresetRecord

Namespace
NanoQL.Extensions.Conventions
Assembly
NanoQL.Extensions.dll

A currency preset (CurrencyPreset): one of QuantLib's currencies by its ISO 4217 code, with the data its constructor reads through the set.

public sealed record CurrencyPresetRecord : ConventionRecord, IEquatable<ConventionRecord>, IEquatable<CurrencyPresetRecord>
Inheritance
CurrencyPresetRecord
Implements
Inherited Members

Remarks

A record of a preset's code must keep QuantLib's name and numeric code, which with the code are the currency's identity, read by its equality and the exchange-rate registries; its other fields configure the currency. There are no currencies of a user's own.

Constructors

CurrencyPresetRecord(string, string?)

Initializes a new instance of the CurrencyPresetRecord class.

public CurrencyPresetRecord(string name, string? @base = null)

Parameters

name string

The currency's ISO 4217 code.

base string

The record it is based on, or null.

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

FractionSymbol

Gets the fraction's symbol, or null to take the base's.

public string? FractionSymbol { get; init; }

Property Value

string

FractionsPerUnit

Gets the fractions in a unit, or null to take the base's.

public int? FractionsPerUnit { get; init; }

Property Value

int?

NumericCode

Gets the ISO 4217 numeric code, QuantLib's, or null to take the base's.

public int? NumericCode { get; init; }

Property Value

int?

QuantLibName

Gets QuantLib's name of the currency, or null to take the base's.

public string? QuantLibName { get; init; }

Property Value

string

Rounding

Gets the rounding convention, or null to take the base's.

public CurrencyRounding? Rounding { get; init; }

Property Value

CurrencyRounding

Symbol

Gets the symbol, or null to take the base's.

public string? Symbol { get; init; }

Property Value

string

TriangulationCurrency

Gets the code of the currency used for triangulated exchange: an empty string for none, or null to take the base's.

public string? TriangulationCurrency { get; init; }

Property Value

string

Methods

Equals(ConventionRecord?)

public override sealed bool Equals(ConventionRecord? other)

Parameters

other ConventionRecord

Returns

bool

Equals(CurrencyPresetRecord?)

public bool Equals(CurrencyPresetRecord? other)

Parameters

other CurrencyPresetRecord

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(CurrencyPresetRecord?, CurrencyPresetRecord?)

public static bool operator ==(CurrencyPresetRecord? left, CurrencyPresetRecord? right)

Parameters

left CurrencyPresetRecord
right CurrencyPresetRecord

Returns

bool

operator !=(CurrencyPresetRecord?, CurrencyPresetRecord?)

public static bool operator !=(CurrencyPresetRecord? left, CurrencyPresetRecord? right)

Parameters

left CurrencyPresetRecord
right CurrencyPresetRecord

Returns

bool