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
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
FractionSymbol
Gets the fraction's symbol, or null to take the base's.
public string? FractionSymbol { get; init; }
Property Value
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
Rounding
Gets the rounding convention, or null to take the base's.
public CurrencyRounding? Rounding { get; init; }
Property Value
Symbol
Gets the symbol, or null to take the base's.
public string? Symbol { get; init; }
Property Value
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
Methods
Equals(ConventionRecord?)
public override sealed bool Equals(ConventionRecord? other)
Parameters
otherConventionRecord
Returns
Equals(CurrencyPresetRecord?)
public bool Equals(CurrencyPresetRecord? other)
Parameters
otherCurrencyPresetRecord
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(CurrencyPresetRecord?, CurrencyPresetRecord?)
public static bool operator ==(CurrencyPresetRecord? left, CurrencyPresetRecord? right)
Parameters
leftCurrencyPresetRecordrightCurrencyPresetRecord
Returns
operator !=(CurrencyPresetRecord?, CurrencyPresetRecord?)
public static bool operator !=(CurrencyPresetRecord? left, CurrencyPresetRecord? right)
Parameters
leftCurrencyPresetRecordrightCurrencyPresetRecord