Class APIProperty
Use this class to interact with the AntFarm Category Element Property.
The APIProperty class does not provide public
constructors.
Please refer to:
// type as APIPropertyType, value as System.Object
APIProperty property = AntFarmAPI.NewProperty(yourClientId, "yourPropertyName", type, value);
Inheritance
System.Object
APIProperty
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: AntFarm.API
Assembly: AntFarm.dll
Syntax
[Serializable]
public class APIProperty
Properties
Id
Declaration
public Guid Id { get; }
Property Value
Type | Description |
---|---|
System.Guid | Property id |
Name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | Property name |
Type
Declaration
public APIPropertyType Type { get; }
Property Value
Type | Description |
---|---|
APIPropertyType | Property type (see APIPropertyType) |
Value
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
ChangeValue(Object)
Change the value of the property
Declaration
public void ChangeValue(object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | newValue | New value to write to property |
TryGetValueString()
Get property value as string
Declaration
public string TryGetValueString()
Returns
Type | Description |
---|---|
System.String | If successful a string based on property value will be returned |
Exceptions
Type | Condition |
---|---|
APIException | Check APIExceptionCode for further processing. |