Plugins

References
public sealed class Plugins
Immutable collection of plugin data.

Properties

Empty

#
Create a new, empty Plugins instance.
public static Plugins Empty { get; }

FailedCount

#
Gets the number of failed plugins.
public int FailedCount { get; }

FailedLocations

#
Enumerate over the failed locations.
public IEnumerable<string> FailedLocations { get; }

Failures

#
Enumerate over the failed data pairs.
public IEnumerable<(string location, FailureInfo info)> Failures { get; }

Loaded

#
Enumerate over the loaded data triplets.
public IEnumerable<(string location, Plugin plugin, Assembly assembly)> Loaded { get; }

LoadedAssemblies

#
Enumerate over the loaded plugin assemblies.
public IEnumerable<Assembly> LoadedAssemblies { get; }

LoadedCount

#
Gets the number of loaded plugins.
public int LoadedCount { get; }

LoadedLocations

#
Enumerate over the loaded locations.
public IEnumerable<string> LoadedLocations { get; }

LoadedPlugins

#
Enumerate over the loaded plugin instances.
public IEnumerable<Plugin> LoadedPlugins { get; }

LoadingProgress

#
Gets the progress factor (0.0 to 1.0). This is the ratio of all loaded+failed plugins to all known plugins.
public float LoadingProgress { get; }

ScopedCount

#
Gets the number of scoped locations.
public int ScopedCount { get; }

ScopedLocations

#
Enumerate over the scoped locations.
public IEnumerable<string> ScopedLocations { get; }

Methods

AddFailedLocation

#
Add a failed location to this Plugins instance. The location must currently already be part of the Scoped list.
public Plugins AddFailedLocation(
location,
Location to add to failed list.
info
Reason for load failure.
)

AddLoadedPlugin

#
Add a loaded plugin to this Plugins instance. The location must currently already be part of the Scoped list and may not be part of the failed list.
public Plugins AddLoadedPlugin(
location,
Location to add to failed list.
plugin,
Plugin instance.
assembly
Plugin assembly.
)

AddScopedLocation

#
Add a scoped location to this Plugins instance.
public Plugins AddScopedLocation(
location
Location to add to scoped list.
)

FindFailureInfo

#
Find the failure info (if any) associated with the given plugin location.
public FailureInfo FindFailureInfo(
location
)

FindPlugin

#
Find the loaded plugin (if any) associated with the given location.
public Plugin FindPlugin(
location
)

ForgetScopedLocation

#
Remove a location from the scoped list.
public Plugins ForgetScopedLocation(
location
)

IsLocationFailed

#
Test whether a specific uri has already failed to load and is now part of the failed list.
public bool IsLocationFailed(
location
Location to test.
)
True if location has already failed.

IsLocationKnown

#
Test whether a specific uri is known at all.
public bool IsLocationKnown(
location
Location to test.
)
True if location is either scoped, loaded or failed.

IsLocationLoaded

#
Test whether a specific uri is already part of the Loaded Locations list.
public bool IsLocationLoaded(
location
Location to test.
)
True if location is already loaded.

IsLocationScoped

#
Test whether a specific uri is already part of the Scoped Locations list.
public bool IsLocationScoped(
location
Location to test.
)
True if location is already scoped.

RemoveLocation

#
Remove a location from either the loaded or the failed lists.
public Plugins RemoveLocation(
location
Location to remove.
)