Skip to content

BH.oM.Adapter.AdapterSettings

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 AdapterSettings is inheriting from the following base type(s) and implements the following interfaces:

Classes inheriting from this class

The following classes are inheriting from this class:

Properties

Defining properties

The following properties are defined on the class

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 AdapterSettings : BH.oM.Base.IObject

Assembly: Adapter_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/Adapter_oM/AdapterSettings.json"
}

The JSON Schema is available on github here: