Contains a property value. The value can be fetched as a generic Object or one of the convenience asXXXX methods can be used to get the value in a specific type.  
 More...
|  | 
|  | Property (object value, sbyte dataTypeId) | 
|  | Create a new Property with a value and data type.  More... 
 | 
|  | 
|  | Property (object value, sbyte dataTypeId, bool isCollectionOfValues) | 
|  | Create a new Property with a value and data type.  More... 
 | 
|  | 
| virtual sbyte | GetDataTypeId () | 
|  | Get the data type ID for values associated with this Property  More... 
 | 
|  | 
| virtual string | GetDataType () | 
|  | Get the data type name for values associated with this Property  More... 
 | 
|  | 
| virtual object | Value () | 
|  | Get the value Object. This needs to be cast to the appropriate type such as Integer to be used. E.g. Integer value = (Integer)property.value();  More... 
 | 
|  | 
| override string | ToString () | 
|  | Get the value of the property as a String. Alias for asString() . If a property has multiple possible values then the values are concatenated with a comma.  More... 
 | 
|  | 
| virtual string | AsString () | 
|  | Get the value of the property as a String. Alias for toString() .  More... 
 | 
|  | 
| virtual bool | AsBoolean () | 
|  | Get the value of the property as a boolean.  More... 
 | 
|  | 
| virtual int | AsInteger () | 
|  | Get the value of the property as an int.  More... 
 | 
|  | 
| virtual IList | AsSet () | 
|  | Gets a set of possible values for this property. This is typically only used when it is known that a given property name can have multiple possible values. All items in the set will have the same data tyoe.  More... 
 | 
|  | 
| override bool | Equals (object obj) | 
|  | Check if another object is equal to this object. It must have the same interface, data type and value.  More... 
 | 
|  | 
| override int | GetHashCode () | 
|  | Get object hashcode  More... 
 | 
|  | 
Contains a property value. The value can be fetched as a generic Object or one of the convenience asXXXX methods can be used to get the value in a specific type. 
- Copyright
- Copyright (c) 2021 by DeviceAtlas Limited. All rights reserved. 
- Author
- DeviceAtlas Limited 
  
  | 
        
          | Mobi.Mtld.DA.Property.Property | ( | object | value, |  
          |  |  | sbyte | dataTypeId |  
          |  | ) |  |  |  | inline | 
 
Create a new Property with a value and data type. 
- Parameters
- 
  
    | value | The value to store |  | dataTypeId | The type of the value to store |  
 
 
 
  
  | 
        
          | Mobi.Mtld.DA.Property.Property | ( | object | value, |  
          |  |  | sbyte | dataTypeId, |  
          |  |  | bool | isCollectionOfValues |  
          |  | ) |  |  |  | inline | 
 
Create a new Property with a value and data type. 
- Parameters
- 
  
    | value | The value to store |  | dataTypeId | The type of the value to store |  | isCollectionOfValues | Indicates if the Property will contain a single value or multiple values |  
 
 
 
  
  | 
        
          | virtual bool Mobi.Mtld.DA.Property.AsBoolean | ( |  | ) |  |  | inlinevirtual | 
 
Get the value of the property as a boolean. 
- Returns
- The boolean value of the property 
- Exceptions
- 
  
    | IncorrectPropertyTypeException | Thrown if the type of the value is not a DataType.BOOLEAN |  
 
 
 
  
  | 
        
          | virtual int Mobi.Mtld.DA.Property.AsInteger | ( |  | ) |  |  | inlinevirtual | 
 
Get the value of the property as an int. 
- Returns
- The integer value of the property. 
- Exceptions
- 
  
    | IncorrectPropertyTypeException | Thrown if the type of the value is not compatible with a DataType.INTEGER |  
 
 
 
  
  | 
        
          | virtual IList Mobi.Mtld.DA.Property.AsSet | ( |  | ) |  |  | inlinevirtual | 
 
Gets a set of possible values for this property. This is typically only used when it is known that a given property name can have multiple possible values. All items in the set will have the same data tyoe. 
- Returns
- A set of values. 
 
 
  
  | 
        
          | virtual string Mobi.Mtld.DA.Property.AsString | ( |  | ) |  |  | inlinevirtual | 
 
Get the value of the property as a String. Alias for toString() . 
- Returns
- The String value of the property 
 
 
  
  | 
        
          | override bool Mobi.Mtld.DA.Property.Equals | ( | object | obj | ) |  |  | inline | 
 
Check if another object is equal to this object. It must have the same interface, data type and value. 
- Parameters
- 
  
    | obj | object to be compared against |  
 
 
 
  
  | 
        
          | virtual string Mobi.Mtld.DA.Property.GetDataType | ( |  | ) |  |  | inlinevirtual | 
 
Get the data type name for values associated with this Property 
- Returns
- The name of the data type 
 
 
  
  | 
        
          | virtual sbyte Mobi.Mtld.DA.Property.GetDataTypeId | ( |  | ) |  |  | inlinevirtual | 
 
Get the data type ID for values associated with this Property 
- Returns
- The ID of the data type 
 
 
  
  | 
        
          | override int Mobi.Mtld.DA.Property.GetHashCode | ( |  | ) |  |  | inline | 
 
 
  
  | 
        
          | override string Mobi.Mtld.DA.Property.ToString | ( |  | ) |  |  | inline | 
 
Get the value of the property as a String. Alias for asString() . If a property has multiple possible values then the values are concatenated with a comma. 
- Returns
- The String value of the property 
 
 
  
  | 
        
          | virtual object Mobi.Mtld.DA.Property.Value | ( |  | ) |  |  | inlinevirtual | 
 
Get the value Object. This needs to be cast to the appropriate type such as Integer to be used. E.g. Integer value = (Integer)property.value(); 
- Returns
- The raw Object value. 
 
 
The documentation for this class was generated from the following file:
- build/common/src/dotnet/Property.cs