Class Loader
Used to handle plugins.
Inheritance
Inherited Members
Namespace: Exiled.Loader
Assembly: Exiled.Loader.dll
Syntax
public class Loader
Constructors
| Improve this Doc View SourceLoader()
Initializes a new instance of the Loader class.
Declaration
public Loader()
Properties
| Improve this Doc View SourceDependencies
Gets plugin dependencies.
Declaration
public static List<Assembly> Dependencies { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Reflection.Assembly> |
Deserializer
Gets or sets the deserializer for configs and translations.
Declaration
public static IDeserializer Deserializer { get; set; }
Property Value
Type | Description |
---|---|
YamlDotNet.Serialization.IDeserializer |
Locations
Gets a dictionary containing the file paths of assemblies.
Declaration
public static Dictionary<Assembly, string> Locations { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Reflection.Assembly, System.String> |
Plugins
Gets the plugins list.
Declaration
public static SortedSet<IPlugin<IConfig>> Plugins { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.SortedSet<IPlugin<IConfig>> |
Random
Gets the initialized global random class.
Declaration
public static Random Random { get; }
Property Value
Type | Description |
---|---|
System.Random |
Serializer
Gets or sets the serializer for configs and translations.
Declaration
public static ISerializer Serializer { get; set; }
Property Value
Type | Description |
---|---|
YamlDotNet.Serialization.ISerializer |
Version
Gets the version of the assembly.
Declaration
public static Version Version { get; }
Property Value
Type | Description |
---|---|
System.Version |
Methods
| Improve this Doc View SourceCreatePlugin(Assembly)
Create a plugin instance.
Declaration
public static IPlugin<IConfig> CreatePlugin(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The plugin assembly. |
Returns
Type | Description |
---|---|
IPlugin<IConfig> | Returns the created plugin instance or null. |
DisablePlugins()
Disables all plugins.
Declaration
public static void DisablePlugins()
EnablePlugins()
Enables all plugins.
Declaration
public static void EnablePlugins()
GetPlugin(String)
Gets a plugin with its prefix or name.
Declaration
public static IPlugin<IConfig> GetPlugin(string args)
Parameters
Type | Name | Description |
---|---|---|
System.String | args | The name or prefix of the plugin (Using the prefix is recommended). |
Returns
Type | Description |
---|---|
IPlugin<IConfig> | The desired plugin, null if not found. |
LoadAssembly(String)
Loads an assembly.
Declaration
public static Assembly LoadAssembly(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path to load the assembly from. |
Returns
Type | Description |
---|---|
System.Reflection.Assembly | Returns the loaded assembly or null. |
LoadPlugins()
Loads all plugins.
Declaration
public static void LoadPlugins()
ReloadPlugins()
Reloads all plugins.
Declaration
public static void ReloadPlugins()
Run(Assembly[])
Runs the plugin manager, by loading all dependencies, plugins, configs and then enables all plugins.
Declaration
public IEnumerator<float> Run(Assembly[] dependencies = null)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly[] | dependencies | The dependencies that could have been loaded by Exiled.Bootstrap. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Single> | A MEC System.Collections.Generic.IEnumerator<T>. |