Class RegistryBuilder
- Namespace
- Refractor
- Assembly
- Refractor.dll
Collects custom and plugin backends into a Registry. It starts with every built-in backend.
public sealed class RegistryBuilder : IDisposable
- Inheritance
-
RegistryBuilder
- Implements
- Inherited Members
Constructors
RegistryBuilder()
Starts a builder holding every built-in backend.
public RegistryBuilder()
Methods
AddBackend(string, int, BackendFeatures, Func<CustomBackend?>)
Registers a backend written in .NET. factory makes one instance per
backend prism creates, and returning null fails that creation. features
must list exactly the operations the backend overrides: prism only calls those.
public BackendId AddBackend(string name, int priority, BackendFeatures features, Func<CustomBackend?> factory)
Parameters
namestringpriorityintfeaturesBackendFeaturesfactoryFunc<CustomBackend>
Returns
- BackendId
The id prism derived from
name.
AddLibrary(string, int?)
Loads a prism plugin library and registers every backend in it. This runs the library's
own code. priorityOverride replaces each backend's declared priority.
public int AddLibrary(string path, int? priorityOverride = null)
Parameters
Returns
- int
How many backends were added.
Dispose()
Frees the builder, and any registrations not moved into a registry.
public void Dispose()
Freeze()
Moves every registration into a new registry. The builder is spent afterwards but still needs disposing.
public Registry Freeze()