ObjectProxies

public static class ObjectProxies
Collection of all loaded document object proxies.

Properties

Chapters

#
public static IEnumerable<ObjectProxies.Chapter> Chapters { get; }
Enumerate over all chapters in the order in which they should appear in the tabs.

Count

#
public static int Count { get; }
Gets the number of proxies in this server.

DefaultRules

#
public static Rules DefaultRules { get; }
Gets the default rules used for proxy organisation.

Pins

#
public static IEnumerable<(Guid ioId, Guid pinId)> Pins { get; }
Enumerate over all available pins id pairs.

Proxies

#
public static IEnumerable<ObjectProxy> Proxies { get; }
Enumerate over all proxies which the user is allowed to browse. Objects belonging to a fleeting plugin are omitted — see FleetingPlugins — as are they from Chapters and from Search(string[], bool, bool, Maths.MaximumSearchMultiple<object>).

Methods

CreateOverlappingParameter

#
public static IParameter CreateOverlappingParameter(IEnumerable<IParameter> parameters)
Create a new standard parameter which is compatible with all given parameters.
parameters (IEnumerable<IParameter>)

Describe

#
public static string Describe(Guid id, NameDescription name, TypeDescription type, string fallback = null)
Describe an object.
id (Guid)
name (NameDescription)
type (TypeDescription)
fallback (string = null)

FindById

#
public static ObjectProxy FindById(Guid id)
Try and get a proxy based on ID.
id (Guid)

FindByType

#
public static ObjectProxy FindByType(Type type)
Try and get a proxy based on a document object type.
type (Type)

IsKnownId

#
public static bool IsKnownId(Guid id)
Gets whether a specific ObjectId has been registered with this server.
id (Guid)

RegisterMigrator

#
public static bool RegisterMigrator(object migrator)
Add a new migrator instance to this server.
migrator (object)Migrator instance.
True if the migrator was added, false if one for the same id was registered already.

RegisterMigrator

#
public static bool RegisterMigrator(Type migratorType)
Add a new migrator type to this server.
migratorType (Type)Type of migrator class.
True if migrator was added.

RegisterObject

#
public static bool RegisterObject(Type objectType, Plugin plugin)
Add a new object type to this server.
objectType (Type)Object type, must be a constructible type which is assignable to IDocumentObject.
plugin (Plugin)Plugin which owns this object.
True if type was added.

RegisterProxy

#
public static bool RegisterProxy(ObjectProxy objectProxy)
Register a custom proxy. You only need this method if your components are not compiled as part of your plugin.
objectProxy (ObjectProxy)Custom object proxy to add.
True if the proxy was added.

SanitiseSearchQuery

#
public static string[] SanitiseSearchQuery(string query, out bool includeHidden, out bool includeObsolete)
Convert a query string into valid search fragments.
query (string)Query string to parse.
includeHidden (out bool)Set to true if the query is supposed to include hidden objects.
includeObsolete (out bool)Set to true if the query is supposed to include obsolete objects.
Array of clean search fragments.

Search

#
public static void Search(string[] queryFragments, bool includeHidden, bool includeObsolete, MaximumSearchMultiple<object> results)
Search all proxies and append them to a result.
queryFragments (string[])Clean search query terms.
includeHidden (bool)If true, hidden objects will be included in the search.
includeObsolete (bool)If true, obsolete objects will be included in the search.
results (Maths.MaximumSearchMultiple<object>)Result to append ObjectProxy instances to.

StandardParameterIoId

#
public static Guid StandardParameterIoId(IEnumerable<IParameter> parameters)
Gets the IoIdAttribute of the parameter type which provides supports for the given type constraint. This method only returns basic parameters. The following types can be used to indicate "special" parameters:

Fraction -> NumericParameter

Curve -> CurveParameter

Surface -> SurfaceParameter

parameters (IEnumerable<IParameter>)

StandardParameterIoId

#
public static Guid StandardParameterIoId(Type constraint)
Gets the IoIdAttribute of the parameter type which provides supports for the given type constraint. This method only returns basic parameters. The following types can be used to indicate "special" parameters:

Fraction -> NumericParameter

Curve -> CurveParameter

Surface -> SurfaceParameter

constraint (Type)

TryEmit<T>

#
public static T TryEmit<T>(Guid ioid)
Try and create an instance of an IDocumentObject via its IoIdAttribute value.
ioid (Guid)