C# 클래스 PaulStovell.TrialBalance.DomainModel.Balance

A special type used to indicate an accounting balance.
상속: IFormattable
파일 보기 프로젝트 열기: PaulStovell/trial-balance 1 사용 예제들

공개 메소드들

메소드 설명
Balance ( ) : System

Constructor.

Balance ( decimal value, BalanceType type ) : System

Constructor.

Credit ( decimal value ) : Balance

Credits this balance by a given amount, resulting in a new balance.

Debit ( decimal value ) : Balance

Debits this balance by a given amount, resulting in a new balance.

Equals ( object obj ) : bool

Checks if this object and another object are equal.

GetHashCode ( ) : int

Gets a hash code for this balance.

Parse ( string balanceText ) : Balance

Parses a Balance given a string and the type of balance expected.

Parse ( string balanceText, BalanceType expectedBalanceType ) : Balance

Parses a Balance given a string and the type of balance expected.

ToString ( ) : string

Gets a string representation of the current balance.

ToString ( string format, IFormatProvider formatProvider ) : string

Gets a string representation of the current balance.

TryParse ( string balanceText, Balance &resultBalance ) : bool

Attempts to parse a Balance given a string.

TryParse ( string balanceText, BalanceType expectedBalanceType, Balance &resultBalance ) : bool

Attempts to parse a Balance given a string and the type of balance expected.

operator ( ) : Balance

Adds two balances.

operator ( ) : bool

Not equals operator.

메소드 상세

Balance() 공개 메소드

Constructor.
public Balance ( ) : System
리턴 System

Balance() 공개 메소드

Constructor.
public Balance ( decimal value, BalanceType type ) : System
value decimal The value of the balance.
type BalanceType The type of balance.
리턴 System

Credit() 공개 메소드

Credits this balance by a given amount, resulting in a new balance.
public Credit ( decimal value ) : Balance
value decimal The value to credit this balance.
리턴 Balance

Debit() 공개 메소드

Debits this balance by a given amount, resulting in a new balance.
public Debit ( decimal value ) : Balance
value decimal The value to debit this balance.
리턴 Balance

Equals() 공개 메소드

Checks if this object and another object are equal.
public Equals ( object obj ) : bool
obj object The other object to check.
리턴 bool

GetHashCode() 공개 메소드

Gets a hash code for this balance.
public GetHashCode ( ) : int
리턴 int

Parse() 공개 정적인 메소드

Parses a Balance given a string and the type of balance expected.
public static Parse ( string balanceText ) : Balance
balanceText string The text to attempt to parse.
리턴 Balance

Parse() 공개 정적인 메소드

Parses a Balance given a string and the type of balance expected.
public static Parse ( string balanceText, BalanceType expectedBalanceType ) : Balance
balanceText string The text to attempt to parse.
expectedBalanceType BalanceType The type of balance expected. If null, 'CR' or 'DR' must be specified in the balance text.
리턴 Balance

ToString() 공개 메소드

Gets a string representation of the current balance.
public ToString ( ) : string
리턴 string

ToString() 공개 메소드

Gets a string representation of the current balance.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string A format specification.
formatProvider IFormatProvider An IFormatProvider that supplies culture specific formatting information.
리턴 string

TryParse() 공개 정적인 메소드

Attempts to parse a Balance given a string.
public static TryParse ( string balanceText, Balance &resultBalance ) : bool
balanceText string The text to attempt to parse.
resultBalance Balance If parsing is sucessful, this will contain the parsed balance.
리턴 bool

TryParse() 공개 정적인 메소드

Attempts to parse a Balance given a string and the type of balance expected.
public static TryParse ( string balanceText, BalanceType expectedBalanceType, Balance &resultBalance ) : bool
balanceText string The text to attempt to parse.
expectedBalanceType BalanceType The type of balance expected. If null, 'CR' or 'DR' must be specified in the balance text.
resultBalance Balance If parsing is sucessful, this will contain the parsed balance.
리턴 bool

operator() 공개 정적인 메소드

Adds two balances.
public static operator ( ) : Balance
리턴 Balance

operator() 공개 정적인 메소드

Not equals operator.
public static operator ( ) : bool
리턴 bool