Show / Hide Table of Contents

Struct NumUnits

Represents "ALL" units or a fixed number of units.

Implements
IEquatable<NumUnits>
Namespace: FFT.Oanda
Assembly: FFT.Oanda.dll
Syntax
public struct NumUnits : IEquatable<NumUnits>

Constructors

| Improve this Doc View Source

NumUnits(Decimal)

Initializes a new instance of the NumUnits struct. Use this constructor when you need to specify a fixed number of units.

Declaration
public NumUnits(decimal value)
Parameters
Type Name Description
System.Decimal value

The fixed number of units that you wish to specify.

| Improve this Doc View Source

NumUnits(String)

Initializes a new instance of the NumUnits struct.

Declaration
public NumUnits(string numUnits)
Parameters
Type Name Description
System.String numUnits

Either "ALL" or the string representation of a decimal value for a fixed number of units.

Properties

| Improve this Doc View Source

All

A singleton value to be used for quick access to an instance representing "ALL" units.

Declaration
public static NumUnits All { get; }
Property Value
Type Description
NumUnits
| Improve this Doc View Source

IsAllUnits

Gets true if this value represents "ALL" units rather than a fixed number of units. Gets false otherwise.

Declaration
public bool IsAllUnits { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Value

Gets the fixed number of units represented by this value, if it is NOT "ALL" units.

Declaration
public decimal Value { get; }
Property Value
Type Description
System.Decimal
| Improve this Doc View Source

Zero

A singleton value to be used for quick access to an instance representing "0" units.

Declaration
public static NumUnits Zero { get; }
Property Value
Type Description
NumUnits

Methods

| Improve this Doc View Source

Equals(NumUnits)

Declaration
public bool Equals(NumUnits other)
Parameters
Type Name Description
NumUnits other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Nullable<Object>)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
| Improve this Doc View Source

ToString()

Returns "ALL" if this value represents all units. Otherwise, it returns a string representation of the decimal value.

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

| Improve this Doc View Source

Equality(NumUnits, NumUnits)

Declaration
public static bool operator ==(NumUnits left, NumUnits right)
Parameters
Type Name Description
NumUnits left
NumUnits right
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Implicit(Decimal to NumUnits)

Implicitly converts a decimal value to a NumUnits value.

Declaration
public static implicit operator NumUnits(decimal value)
Parameters
Type Name Description
System.Decimal value

The value to be converted.

Returns
Type Description
NumUnits
| Improve this Doc View Source

Implicit(Int32 to NumUnits)

Implicitly converts an int32 value to a NumUnits value.

Declaration
public static implicit operator NumUnits(int value)
Parameters
Type Name Description
System.Int32 value

The value to be converted.

Returns
Type Description
NumUnits
| Improve this Doc View Source

Inequality(NumUnits, NumUnits)

Declaration
public static bool operator !=(NumUnits left, NumUnits right)
Parameters
Type Name Description
NumUnits left
NumUnits right
Returns
Type Description
System.Boolean

Implements

IEquatable<>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX