Table of Contents

MoneyBagConversionLine Struct

Definition

Namespace
Bodu.Financial
Assembly
Bodu.Financial.dll
Package
Bodu.Financial 1.0.0
Source
MoneyBagConversionLine.cs

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

SourceIsoCode string

The source-currency ISO code for this line.

SourceAmount decimal

The bag's raw decimal balance for that source.

Rate RateLookupResult?

The exchange-rate lookup result used for the conversion, or null when the source already matches the target currency (identity pass-through).

RawConvertedAmount decimal

The unrounded contribution to the aggregated total - SourceAmount × Rate for cross-currency lines or SourceAmount for 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

RateLookupResult?

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

decimal

SourceAmount

The bag's raw decimal balance for that source.

public decimal SourceAmount { get; init; }

Property Value

decimal

SourceIsoCode

The source-currency ISO code for this line.

public string SourceIsoCode { get; init; }

Property Value

string

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

SourceIsoCode string
SourceAmount decimal
Rate RateLookupResult?
RawConvertedAmount decimal

Equals(MoneyBagConversionLine)

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

public bool Equals(MoneyBagConversionLine other)

Parameters

other MoneyBagConversionLine

An object to compare with this object.

Returns

bool

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

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; 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.

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

left MoneyBagConversionLine
right MoneyBagConversionLine

Returns

bool

operator !=(MoneyBagConversionLine, MoneyBagConversionLine)

public static bool operator !=(MoneyBagConversionLine left, MoneyBagConversionLine right)

Parameters

left MoneyBagConversionLine
right MoneyBagConversionLine

Returns

bool

Applies to

ProductVersions
.NET8, 10