MoneyBagConversionLine Struct
Definition
- Assembly
- Bodu.Financial.dll
- Package
- Bodu.Financial 1.0.0
Captures the per-line audit metadata produced by ConvertToWithAudit<TTarget>(IDatedRateProvider, DateOnly, RateLookupOptions?, MoneyBagConversionRoundingPolicy) for a single source currency in the bag.
public readonly struct MoneyBagConversionLine : IEquatable<MoneyBagConversionLine>
- Implements
- Inherited Members
- Extension Methods
Constructors
MoneyBagConversionLine(string, decimal, RateLookupResult?, decimal)
Captures the per-line audit metadata produced by ConvertToWithAudit<TTarget>(IDatedRateProvider, DateOnly, RateLookupOptions?, MoneyBagConversionRoundingPolicy) for a single source currency in the bag.
public MoneyBagConversionLine(string SourceIsoCode, decimal SourceAmount, RateLookupResult? Rate, decimal RawConvertedAmount)
Parameters
SourceIsoCodestringThe source-currency ISO code for this line.
SourceAmountdecimalThe bag's raw decimal balance for that source.
RateRateLookupResult?The exchange-rate lookup result used for the conversion, or null when the source already matches the target currency (identity pass-through).
RawConvertedAmountdecimalThe unrounded contribution to the aggregated total -
SourceAmount × Ratefor cross-currency lines orSourceAmountfor the identity pass-through.
Properties
Rate
The exchange-rate lookup result used for the conversion, or null when the source already matches the target currency (identity pass-through).
public RateLookupResult? Rate { get; init; }
Property Value
RawConvertedAmount
The unrounded contribution to the aggregated total - SourceAmount × Rate for cross-currency lines or
SourceAmount for the identity pass-through.
public decimal RawConvertedAmount { get; init; }
Property Value
SourceAmount
The bag's raw decimal balance for that source.
public decimal SourceAmount { get; init; }
Property Value
SourceIsoCode
The source-currency ISO code for this line.
public string SourceIsoCode { get; init; }
Property Value
Methods
Deconstruct(out string, out decimal, out RateLookupResult?, out decimal)
public void Deconstruct(out string SourceIsoCode, out decimal SourceAmount, out RateLookupResult? Rate, out decimal RawConvertedAmount)
Parameters
SourceIsoCodestringSourceAmountdecimalRateRateLookupResult?RawConvertedAmountdecimal
Equals(MoneyBagConversionLine)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(MoneyBagConversionLine other)
Parameters
otherMoneyBagConversionLineAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
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.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(MoneyBagConversionLine, MoneyBagConversionLine)
public static bool operator ==(MoneyBagConversionLine left, MoneyBagConversionLine right)
Parameters
leftMoneyBagConversionLinerightMoneyBagConversionLine
Returns
operator !=(MoneyBagConversionLine, MoneyBagConversionLine)
public static bool operator !=(MoneyBagConversionLine left, MoneyBagConversionLine right)
Parameters
leftMoneyBagConversionLinerightMoneyBagConversionLine
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |