Lean  $LEAN_TAG$
QuantConnect.Securities.CashAmount Struct Reference

Represents a cash amount which can be converted to account currency using a currency converter More...

Public Member Functions

 CashAmount (decimal amount, string currency)
 Initializes a new instance of the CashAmount class More...
 
override bool Equals (object obj)
 Used to compare two CashAmount instances. Useful to compare against the default instance More...
 
override int GetHashCode ()
 Get Hash Code for this Object More...
 

Static Public Member Functions

static bool operator== (CashAmount lhs, CashAmount rhs)
 Will determine if two CashAmount instances are equal Useful to compare against the default instance More...
 
static bool operator!= (CashAmount lhs, CashAmount rhs)
 Will determine if two CashAmount instances are different Useful to compare against the default instance More...
 

Properties

decimal Amount [get]
 The amount of cash More...
 
string Currency [get]
 The currency in which the cash amount is denominated More...
 

Detailed Description

Represents a cash amount which can be converted to account currency using a currency converter

Definition at line 24 of file CashAmount.cs.

Constructor & Destructor Documentation

◆ CashAmount()

QuantConnect.Securities.CashAmount.CashAmount ( decimal  amount,
string  currency 
)

Initializes a new instance of the CashAmount class

Parameters
amountThe amount
currencyThe currency

Definition at line 43 of file CashAmount.cs.

Here is the caller graph for this function:

Member Function Documentation

◆ operator==()

static bool QuantConnect.Securities.CashAmount.operator== ( CashAmount  lhs,
CashAmount  rhs 
)
static

Will determine if two CashAmount instances are equal Useful to compare against the default instance

Returns
True if Currency and Amount are equal

Definition at line 54 of file CashAmount.cs.

Here is the call graph for this function:

◆ operator!=()

static bool QuantConnect.Securities.CashAmount.operator!= ( CashAmount  lhs,
CashAmount  rhs 
)
static

Will determine if two CashAmount instances are different Useful to compare against the default instance

Returns
True if Currency or Amount are different

Definition at line 64 of file CashAmount.cs.

Here is the call graph for this function:

◆ Equals()

override bool QuantConnect.Securities.CashAmount.Equals ( object  obj)

Used to compare two CashAmount instances. Useful to compare against the default instance

Parameters
objThe other object to compare with
Returns
True if Currency and Amount are equal

Definition at line 75 of file CashAmount.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHashCode()

override int QuantConnect.Securities.CashAmount.GetHashCode ( )

Get Hash Code for this Object

Returns
Integer Hash Code

Definition at line 90 of file CashAmount.cs.

Property Documentation

◆ Amount

decimal QuantConnect.Securities.CashAmount.Amount
get

The amount of cash

Definition at line 30 of file CashAmount.cs.

◆ Currency

string QuantConnect.Securities.CashAmount.Currency
get

The currency in which the cash amount is denominated

Definition at line 36 of file CashAmount.cs.


The documentation for this struct was generated from the following file: