C# Class Oda.Plugin

An Oda plugin. All plugins have this class as their base class.
Datei anzeigen Open project: CorbinDallas/Oda

Public Methods

Method Description
GetPlugin ( Type pluginType ) : object

Gets a plugin by the plugins type.

GetPlugin ( string pluginName ) : object

Gets a plugin by the plugins name.

GetResource ( string resourcePath ) : Stream

Gets an embedded resource stream.

GetResourceImage ( string resourcePath ) : Bitmap

Gets an embedded resource image.

GetResourceString ( string resourcePath ) : string

Gets the resource string starting from the project root.

Private Methods

Method Description
ActivatePlugins ( ) : void

Activates the plugins located in the host sites AppDomain (/bin).

FindManifestResourceName ( string resourcePath ) : string

Finds the name of the manifest resource by scanning the embedded manifest resource names looking for the closest match.

GetInheritanceFile ( string resourcePath ) : Stream

Gets the inheritance file matching this resource path.

GetInheritanceFilePath ( string resourcePath ) : string

Gets the inheritance file path. The path is a combination of Physical application path + Plugin Assembly name + Resource Path For example: A resource named /Sql/CreateSession.sql in the plugin Oda.Authentication in an application in C:\inetpub\www.mysite.com\ would appear as C:\inetpub\www.mysite.com\Oda.Authentication\Sql\CreateSession.sql.

InheritanceFileExist ( string resourcePath ) : bool

Check if the inheritances the file exist for this resource path.

LoadJsonMethods ( IEnumerable assemblies ) : void
LoadPlugin ( Type type, ICollection unloadedPlugins, ICollection loadedPlugins ) : void

Used internally to load a plugin when dependencies are satisfied.

Method Details

GetPlugin() public static method

Gets a plugin by the plugins type.
public static GetPlugin ( Type pluginType ) : object
pluginType System.Type Type of the plugin.
return object

GetPlugin() public static method

Gets a plugin by the plugins name.
public static GetPlugin ( string pluginName ) : object
pluginName string Name of the plugin.
return object

GetResource() public method

Gets an embedded resource stream.
public GetResource ( string resourcePath ) : Stream
resourcePath string The resource path starting from the project root.
return Stream

GetResourceImage() public method

Gets an embedded resource image.
public GetResourceImage ( string resourcePath ) : Bitmap
resourcePath string The resource path.
return System.Drawing.Bitmap

GetResourceString() public method

Gets the resource string starting from the project root.
public GetResourceString ( string resourcePath ) : string
resourcePath string The resource path.
return string