Struct NumUnits
  
  Represents "ALL" units or a fixed number of units.
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
  
  
    |
    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
  
  Methods
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Equals(NumUnits)
  
  
  Declaration
  
    public bool Equals(NumUnits other)
   
  Parameters
  
  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
  
  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
  
  
    |
    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
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Inequality(NumUnits, NumUnits)
  
  
  Declaration
  
    public static bool operator !=(NumUnits left, NumUnits right)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  Implements
  
      IEquatable<>