Skip to content

BH.oM.Adapters.MidasCivil.MidasCivilSettings

General settings for any Adapter, to be specified when instantiating the Adapter.Implement this class to make your own Toolkit settings, e.g. SpeckleAdapterSettings.

Class structure

Implemented interfaces and base types

The MidasCivilSettings is inheriting from the following base type(s) and implements the following interfaces:

Properties

Defining properties

The following properties are defined on the class

Name Type Description Quantity
Version string The version of MidasCivil to be used by the adapter. -
mApiKey string The active mApi-key when using a version of Midas Civil with API connection available. Found under Apps - API Settings. Make sure Midas is connected to the API before running the adapter. -

Inherited properties

The following properties are inherited from the base class of the object

Name Type Description Quantity
WrapNonBHoMObjects bool If your Toolkit needs support for non-BHoM objects, set this to true. -
DefaultPushType PushType If your Toolkit does not support the Full Push (FullCRUD method), you can select another behaviour here (e.g. CreateOnly). -
CloneBeforePush bool Deep clones the objects before Pushing them.As the objects get modified during the Push (e.g. their externalId is added to them),this avoids backpropagation in visual programming environments like Grasshopper. -
DefaultPullType PullType - -
HandleDependencies bool If your adapter does not define DependencyTypes, this can be set to false for performance. -
HandlePriorities bool - -
UseAdapterId bool - -
UseHashComparerAsDefault bool - -
ProcessInMemory bool - -
OnlyUpdateChangedObjects bool If true, Objects found to be the same according to the AdapterComparer for the provided type are checked for full equality using the HashComparer of the type (which by default checks every property except BHoM_Guid). If equal according to the HashComparer, they are not updated.
Otherwise, Objects found identical according to the AdapterComparer for the provided type are sent to the Update method.
-
CacheCRUDobjects bool If true, CRUD operations will attempt read/write cache objects to speed things during a same Action. -
CreateOnly_DistinctObjects bool If true, CreateOnly method calls Distinct() on the first-level objects. -
CreateOnly_DistinctDependencies bool If true, CreateOnly method calls Distinct() on the dependency objects. -

Code and Schema

C# implementation

C#
public class MidasCivilSettings : BH.oM.Adapter.AdapterSettings, BH.oM.Base.IObject

Assembly: MidasCivil_oM.dll

The C# class definition is available on github:

All history and changes of the class can be found by inspection the history.

JSON Schema implementation

The object is defined as a JSON schema. You can validate a JSON instance against this schema by reference. To do this, use the schema reference below in a validator like this one.

JSON Schema
{
 "$ref" : "https://raw.githubusercontent.com/BHoM/BHoM_JSONSchema/develop/MidasCivil_oM/MidasCivilSettings.json"
}

The JSON Schema is available on github here: