Class APICategory
APICategory is an AntFarm specific AntFarm.Kernel.Types.Attributes.AFAttributeType. Categories hold APIElement(s). An APIElement can hold additional information in APIProperty(s).
The APICategory class does not provide public
constructors.
Please refer to:
,
// elements as List<APIElement> (see APIElement)
APICategory category = AntFarmAPI.NewCategory(yourClientId, "yourCategoryName", elements);
Inheritance
Inherited Members
Namespace: AntFarm.API
Assembly: AntFarm.dll
Syntax
[Serializable]
public class APICategory
Properties
Id
Declaration
public Guid Id { get; }
Property Value
Type | Description |
---|---|
System.Guid | Category id |
IsCheckedOut
Declaration
public bool IsCheckedOut { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Flag if new data will be written to category |
Name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | Name of the Category |
Methods
CommitUpdates()
Commit all updates to AntFarm (this is not saved into the .3dm file)
Declaration
public void CommitUpdates()
Exceptions
Type | Condition |
---|---|
APIException | Thrown when internal methods throw ArgumentNullException. |
Delete()
Deletes category from the context
Declaration
public void Delete()
Exceptions
Type | Condition |
---|---|
APIException |
GetElementNames()
Lists all existing element names in category.
Declaration
public List<string> GetElementNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | List of all element names |
Exceptions
Type | Condition |
---|---|
APIException | Thrown when internal methods throw ArgumentNullException. |
GetElements()
Lists all existing elements in this category.
Declaration
public List<APIElement> GetElements()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<APIElement> | List of all elements |
Exceptions
Type | Condition |
---|---|
APIException | Thrown when internal methods throw ArgumentNullException. |
Rollback()
Performs a rollback of a given category.
Declaration
public void Rollback()
Exceptions
Type | Condition |
---|---|
APIException | Thrown when one of the arguments provided to this method is not valid. |
UpdateElements(List<APIElement>)
Updates all elements in category.
Declaration
public void UpdateElements(List<APIElement> elements)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<APIElement> | elements | List of new elements to update to. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | |
System.ArgumentException |