Class APIDataSet
Use this class to interact with the AntFarm Database.
The APIDataSet class does not provide public constructors.
Please refer to:
// settings as APIDataSetSettings (see APIDataSetSettings)
APIDataSet dataSet = AntFarmAPI.NewDataSet(yourClientId, "yourDataSetName", settings);
Inheritance
Inherited Members
Namespace: AntFarm.API
Assembly: AntFarm.dll
Syntax
[Serializable]
public class APIDataSet
Properties
Id
Declaration
public Guid Id { get; }
Property Value
| Type | Description |
|---|---|
| System.Guid | DataSet Id |
IsCheckedOut
Declaration
public bool IsCheckedOut { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | Flag if new data will be written to DataSet |
IsVirtual
Declaration
public bool IsVirtual { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Name
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String | DataSet Name |
Settings
Declaration
public APIDataSetSettings Settings { get; }
Property Value
| Type | Description |
|---|---|
| APIDataSetSettings | DataSet Settings (see APIDataSetSettings) |
Methods
ApplySettings(APIDataSetSettings)
Override existing DataSet settings
Declaration
public void ApplySettings(APIDataSetSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| APIDataSetSettings | settings | New settings to apply to DataSet |
Commit()
Commit to AntFarm - This will be saved into the .3dm file
Declaration
public void Commit()
CommitUIUpdate()
Commit to AntFarm - this is not saved into the .3dm file
Declaration
public void CommitUIUpdate()
Exceptions
| Type | Condition |
|---|---|
| APIException | Check APIExceptionCode for further processing. |
Delete()
Deletes an APIDataSet from the context
Declaration
public void Delete()
Exceptions
| Type | Condition |
|---|---|
| APIException | Check APIExceptionCode for further processing. |
GetAttributes()
Retrieves the list of APIAttributes in APIDataSet.
Declaration
public List<APIAttribute> GetAttributes()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<APIAttribute> | List of APIAttribute(s) in DataSet |
Exceptions
| Type | Condition |
|---|---|
| APIException | Check APIExceptionCode for further processing. |
GetRecords()
Retrieves the list of APIRecord in APIDataSet
Declaration
public List<APIRecord> GetRecords()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<APIRecord> | List of APIRecord(s) in DataSet |
Exceptions
| Type | Condition |
|---|---|
| APIException | Check APIExceptionCode for further processing. |
Rollback()
Rolls back all changes on the APIDataSet
Declaration
public void Rollback()
Exceptions
| Type | Condition |
|---|---|
| APIException | Check APIExceptionCode for further processing. |
UpdateAttributes(List<APIAttribute>)
Updates all Attributes in APIDataSet
Declaration
public void UpdateAttributes(List<APIAttribute> attributes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<APIAttribute> | attributes | Attributes to update |
Exceptions
| Type | Condition |
|---|---|
| APIException | Check APIExceptionCode for further processing. |
UpdateRecords(List<APIRecord>)
Updates the records in the APIDataSet
Declaration
public void UpdateRecords(List<APIRecord> records)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<APIRecord> | records | Records to update |
Exceptions
| Type | Condition |
|---|---|
| APIException | Check APIExceptionCode for further processing. |