The DeviceAtlas DeviceApi documentation
Public Member Functions | List of all members
Com.DeviceAtlas.Properties Class Reference

Maps dtring property names to Property objects. An instance of this class is returned for every GetProperties() lookup that matches an IP. More...

Inheritance diagram for Com.DeviceAtlas.Properties:

Public Member Functions

 Properties (int capacity)
 
virtual bool Contains< T > (string propertyName, T valueToCheck)
 Check if a property has a specific value. Returns false if property name is invalid or property does not exists or the value to check passed is invalid. More...
 
void Put (string propertyName, Property value)
 Alias to method "Add" for adding Property objects. For compatibility with older DeviceAtlas Apis. More...
 
Property Get (string propertyName)
 Alternate way to Properties[propertyName] for getting the value of a property. For compatibility with older DeviceAtlas Apis. More...
 
int Size ()
 Get the properties count. For compatibility with older DeviceAtlas Apis. More...
 
bool IsEmpty ()
 Check if Properties contains any Property. More...
 
string GetOrDefault (string key, string defaultValue)
 The method returns the String property value for the specified property name, otherwise the defaultValue is returned instead. More...
 
int GetOrDefault (string key, int defaultValue)
 The method returns the Integer property value for the specified property name, otherwise the defaultValue is returned instead. More...
 
bool GetOrDefault (string key, bool defaultValue)
 The method returns the Boolean property value for the specified property name, otherwise the defaultValue is returned instead. More...
 
IList GetOrDefault (string key, IList defaultValue)
 The method returns the IList property value for the specified property name, otherwise the defaultValue is returned instead. More...
 

Detailed Description

Maps dtring property names to Property objects. An instance of this class is returned for every GetProperties() lookup that matches an IP.

Author
DeviceAtlas Limited

Member Function Documentation

◆ Contains< T >()

virtual bool Com.DeviceAtlas.Properties.Contains< T > ( string  propertyName,
valueToCheck 
)
inlinevirtual

Check if a property has a specific value. Returns false if property name is invalid or property does not exists or the value to check passed is invalid.

Parameters
propertyNamethe property to check it's value
valueToCheckthe value to be checked against property's value
Returns
true if value to check matches the property's value

◆ Get()

Property Com.DeviceAtlas.Properties.Get ( string  propertyName)
inline

Alternate way to Properties[propertyName] for getting the value of a property. For compatibility with older DeviceAtlas Apis.

Parameters
propertyNamethe property name
Returns
the value to be set

◆ GetOrDefault() [1/4]

string Com.DeviceAtlas.Properties.GetOrDefault ( string  key,
string  defaultValue 
)
inline

The method returns the String property value for the specified property name, otherwise the defaultValue is returned instead.

Parameters
key
defaultValue
Returns

◆ GetOrDefault() [2/4]

int Com.DeviceAtlas.Properties.GetOrDefault ( string  key,
int  defaultValue 
)
inline

The method returns the Integer property value for the specified property name, otherwise the defaultValue is returned instead.

Parameters
key
defaultValue
Returns

◆ GetOrDefault() [3/4]

bool Com.DeviceAtlas.Properties.GetOrDefault ( string  key,
bool  defaultValue 
)
inline

The method returns the Boolean property value for the specified property name, otherwise the defaultValue is returned instead.

Parameters
key
defaultValue
Returns

◆ GetOrDefault() [4/4]

IList Com.DeviceAtlas.Properties.GetOrDefault ( string  key,
IList  defaultValue 
)
inline

The method returns the IList property value for the specified property name, otherwise the defaultValue is returned instead.

Parameters
key
defaultValue
Returns

◆ IsEmpty()

bool Com.DeviceAtlas.Properties.IsEmpty ( )
inline

Check if Properties contains any Property.

Returns
true=this object contains no Property objects

◆ Put()

void Com.DeviceAtlas.Properties.Put ( string  propertyName,
Property  value 
)
inline

Alias to method "Add" for adding Property objects. For compatibility with older DeviceAtlas Apis.

Parameters
propertyNamethe property name
valuethe value to be set

◆ Size()

int Com.DeviceAtlas.Properties.Size ( )
inline

Get the properties count. For compatibility with older DeviceAtlas Apis.

Returns
the Property object count

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