C# Class Mono.Addins.RuntimeAddin

Run-time representation of an add-in.
Mostrar archivo Open project: slluis/mono-addins Class Usage Examples

Private Properties

Property Type Description
CheckAddinDependencies bool
EnsureAssembliesLoaded void
GetAllAssemblies IEnumerable
GetAllDependencies IEnumerable
GetAllResourceManagers IEnumerable
GetDepAddins Mono.Addins.RuntimeAddin[]
GetModule RuntimeAddin
GetResourceManagers System.Resources.ResourceManager[]
Load Mono.Addins.Description.AddinDescription
LoadModule void
RuntimeAddin System
RuntimeAddin System
UnloadExtensions void

Public Methods

Method Description
CreateInstance ( string typeName ) : object

Creates an instance of a type defined in the add-in

The type will be looked up in the assemblies that implement the add-in, and recursivelly in all add-ins on which it depends. This method throws an InvalidOperationException if the type can't be found. The specified type must have a default constructor.

CreateInstance ( string typeName, bool throwIfNotFound ) : object

Creates an instance of a type defined in the add-in

The type will be looked up in the assemblies that implement the add-in, and recursivelly in all add-ins on which it depends. If the type can't be found, this method throw a InvalidOperationException if 'throwIfNotFound' is 'true', or 'null' otherwise. The specified type must have a default constructor.

GetFilePath ( ) : string

Gets the path of an add-in file

This method can be used to get the full path of a data file deployed together with the add-in.

GetFilePath ( string fileName ) : string

Gets the path of an add-in file

This method can be used to get the full path of a data file deployed together with the add-in.

GetResource ( string resourceName ) : Stream

Gets the content of a resource

The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.

GetResource ( string resourceName, bool throwIfNotFound ) : Stream

Gets the content of a resource

The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.

GetResourceObject ( string name ) : object

Gets a resource object

The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.

GetResourceObject ( string name, bool throwIfNotFound ) : object

Gets a resource object

The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.

GetResourceObject ( string name, bool throwIfNotFound, CultureInfo culture ) : object

Gets a resource object

The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.

GetResourceString ( string name ) : string

Gets a resource string

The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.

GetResourceString ( string name, bool throwIfNotFound ) : string

Gets a resource string

The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.

GetResourceString ( string name, bool throwIfNotFound, CultureInfo culture ) : string

Gets a resource string

The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.

GetType ( string typeName ) : Type

Gets a type defined in the add-in

The type will be looked up in the assemblies that implement the add-in, and recursivelly in all add-ins on which it depends. This method throws an InvalidOperationException if the type can't be found.

GetType ( string typeName, bool throwIfNotFound ) : Type

Gets a type defined in the add-in

The type will be looked up in the assemblies that implement the add-in, and recursivelly in all add-ins on which it depends. If the type can't be found, this method throw a InvalidOperationException if 'throwIfNotFound' is 'true', or 'null' otherwise.

ToString ( ) : string

Private Methods

Method Description
CheckAddinDependencies ( ModuleDescription module, bool forceLoadAssemblies ) : bool
EnsureAssembliesLoaded ( ) : void
GetAllAssemblies ( ) : IEnumerable
GetAllDependencies ( ) : IEnumerable
GetAllResourceManagers ( ) : IEnumerable
GetDepAddins ( ) : Mono.Addins.RuntimeAddin[]
GetModule ( ModuleDescription module ) : RuntimeAddin
GetResourceManagers ( ) : System.Resources.ResourceManager[]
Load ( Addin iad ) : AddinDescription
LoadModule ( ModuleDescription module, ArrayList asmList ) : void
RuntimeAddin ( AddinEngine addinEngine ) : System
RuntimeAddin ( AddinEngine addinEngine, RuntimeAddin parentAddin, ModuleDescription module ) : System
UnloadExtensions ( ) : void

Method Details

CreateInstance() public method

Creates an instance of a type defined in the add-in
The type will be looked up in the assemblies that implement the add-in, and recursivelly in all add-ins on which it depends. This method throws an InvalidOperationException if the type can't be found. The specified type must have a default constructor.
public CreateInstance ( string typeName ) : object
typeName string /// Name of the type. ///
return object

CreateInstance() public method

Creates an instance of a type defined in the add-in
The type will be looked up in the assemblies that implement the add-in, and recursivelly in all add-ins on which it depends. If the type can't be found, this method throw a InvalidOperationException if 'throwIfNotFound' is 'true', or 'null' otherwise. The specified type must have a default constructor.
public CreateInstance ( string typeName, bool throwIfNotFound ) : object
typeName string /// Name of the type. ///
throwIfNotFound bool /// Indicates whether the method should throw an exception if the type can't be found. ///
return object

GetFilePath() public method

Gets the path of an add-in file
This method can be used to get the full path of a data file deployed together with the add-in.
public GetFilePath ( ) : string
return string

GetFilePath() public method

Gets the path of an add-in file
This method can be used to get the full path of a data file deployed together with the add-in.
public GetFilePath ( string fileName ) : string
fileName string /// Relative path of the file ///
return string

GetResource() public method

Gets the content of a resource
The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.
public GetResource ( string resourceName ) : Stream
resourceName string /// Name of the resource ///
return Stream

GetResource() public method

Gets the content of a resource
The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.
public GetResource ( string resourceName, bool throwIfNotFound ) : Stream
resourceName string /// Name of the resource ///
throwIfNotFound bool /// When set to true, an exception will be thrown if the resource is not found. ///
return Stream

GetResourceObject() public method

Gets a resource object
The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.
public GetResourceObject ( string name ) : object
name string /// Name of the resource ///
return object

GetResourceObject() public method

Gets a resource object
The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.
public GetResourceObject ( string name, bool throwIfNotFound ) : object
name string /// Name of the resource ///
throwIfNotFound bool /// When set to true, an exception will be thrown if the resource is not found. ///
return object

GetResourceObject() public method

Gets a resource object
The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.
public GetResourceObject ( string name, bool throwIfNotFound, CultureInfo culture ) : object
name string /// Name of the resource ///
throwIfNotFound bool /// When set to true, an exception will be thrown if the resource is not found. ///
culture System.Globalization.CultureInfo /// Culture of the resource ///
return object

GetResourceString() public method

Gets a resource string
The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.
public GetResourceString ( string name ) : string
name string /// Name of the resource ///
return string

GetResourceString() public method

Gets a resource string
The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.
public GetResourceString ( string name, bool throwIfNotFound ) : string
name string /// Name of the resource ///
throwIfNotFound bool /// When set to true, an exception will be thrown if the resource is not found. ///
return string

GetResourceString() public method

Gets a resource string
The add-in engine will look for resources in the main add-in assembly and in all included add-in assemblies.
public GetResourceString ( string name, bool throwIfNotFound, CultureInfo culture ) : string
name string /// Name of the resource ///
throwIfNotFound bool /// When set to true, an exception will be thrown if the resource is not found. ///
culture System.Globalization.CultureInfo /// Culture of the resource ///
return string

GetType() public method

Gets a type defined in the add-in
The type will be looked up in the assemblies that implement the add-in, and recursivelly in all add-ins on which it depends. This method throws an InvalidOperationException if the type can't be found.
public GetType ( string typeName ) : Type
typeName string /// Full name of the type ///
return System.Type

GetType() public method

Gets a type defined in the add-in
The type will be looked up in the assemblies that implement the add-in, and recursivelly in all add-ins on which it depends. If the type can't be found, this method throw a InvalidOperationException if 'throwIfNotFound' is 'true', or 'null' otherwise.
public GetType ( string typeName, bool throwIfNotFound ) : Type
typeName string /// Full name of the type ///
throwIfNotFound bool /// Indicates whether the method should throw an exception if the type can't be found. ///
return System.Type

ToString() public method

public ToString ( ) : string
return string