Class LocalLoader

Local loader class

Inheritance
System.Object
System.MarshalByRefObject
LocalLoader
Inherited Members
System.MarshalByRefObject.MemberwiseClone(System.Boolean)
System.MarshalByRefObject.GetLifetimeService()
System.MarshalByRefObject.InitializeLifetimeService()
System.MarshalByRefObject.CreateObjRef(System.Type)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Web.Console.Common
Assembly: Mediachase.WebConsoleLib.dll
Version: 10.8.0
Syntax
public class LocalLoader : MarshalByRefObject

Constructors

LocalLoader(String)

Creates the local loader class

Declaration
public LocalLoader(string pluginDirectory)
Parameters
Type Name Description
System.String pluginDirectory

The plugin directory

Properties

Assemblies

The list of loaded plugin assemblies

Declaration
public string[] Assemblies { get; }
Property Value
Type Description
System.String[]

The assemblies.

Types

The list of loaded plugin types

Declaration
public string[] Types { get; }
Property Value
Type Description
System.String[]

The types.

Methods

CallStaticMethod(String, String, Object[])

Returns the result of a static method call

Declaration
public object CallStaticMethod(string typeName, string methodName, object[] methodParams)
Parameters
Type Name Description
System.String typeName

The type to call the static method on

System.String methodName

The name of the method to call

System.Object[] methodParams

The parameters to pass to the method

Returns
Type Description
System.Object

The return value of the method

CreateInstance(String, BindingFlags, Object[])

Returns a proxy to an instance of the specified plugin type

Declaration
public MarshalByRefObject CreateInstance(string typeName, BindingFlags bindingFlags, object[] constructorParams)
Parameters
Type Name Description
System.String typeName

The name of the type to create an instance of

System.Reflection.BindingFlags bindingFlags

The binding flags for the constructor

System.Object[] constructorParams

The parameters to pass to the constructor

Returns
Type Description
System.MarshalByRefObject

The constructed object

GetStaticPropertyValue(String, String)

Returns the value of a static property

Declaration
public object GetStaticPropertyValue(string typeName, string propertyName)
Parameters
Type Name Description
System.String typeName

The type to retrieve the static property value from

System.String propertyName

The name of the property to retrieve

Returns
Type Description
System.Object

The value of the static property

GetSubclasses(String)

Retrieves the type objects for all subclasses of the given type within the loaded plugins.

Declaration
public string[] GetSubclasses(string baseClass)
Parameters
Type Name Description
System.String baseClass

The base class

Returns
Type Description
System.String[]

All subclases

LoadAssembly(String)

Loads the specified assembly

Declaration
public void LoadAssembly(string filename)
Parameters
Type Name Description
System.String filename

The filename of the assembly to load

ManagesType(String)

Determines if this loader manages the specified type

Declaration
public bool ManagesType(string typeName)
Parameters
Type Name Description
System.String typeName

The type to check if this PluginManager handles

Returns
Type Description
System.Boolean

True if this PluginManager handles the type

Unload()

Unloads the plugins

Declaration
public void Unload()