Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Static Public Member Functions | Static Public Attributes | List of all members
AssemblyLoader Class Reference

Classes

class  AssemblyDependency
 
class  LoadedAssembly
 
class  LoadedAssembyList
 
class  LoadedTypes
 
class  LoadedTypesDictionary
 

Static Public Member Functions

static void ClearPlugins ()
 
static void FlagDuplicatedPlugins ()
 Goes through the cached assembly information and flags duplicate plugins. More...
 
static System.Type GetClassByName (System.Type baseType, string name)
 Retrieves a class of base type T from the loaded types More...
 
static List< ConstructorInfo > GetModulesImplementingInterface< T > (System.Type[] param_types)
 
static string GetPathByType (System.Type type)
 Retrieves the relative assembly path from a type contained therein More...
 
static List< Type > GetSubclassesOfParentClass (Type parentType)
 Get a list of subclasses of the parent class. More...
 
static List< Type > GetTypesOfClassesImplementingInterface< T > ()
 Get a list of classes which implement a specified interface. More...
 
static void Initialize (string[] baseTypes)
 Initialize the AssemblyLoader from array of string type names More...
 
static void Initialize (System.Type[] baseTypes)
 Initialize the AssemblyLoader from array of types More...
 
static void LoadAssemblies ()
 
static bool LoadPlugin (FileInfo file, string url, ConfigNode assemblyNode)
 Load a plugin from given FileInfo More...
 
static void LoadPluginInfo (FileInfo file, string url, ConfigNode assemblyNode)
 Load and cache relevant plugin info, such as name, path and version More...
 

Static Public Attributes

static LoadedAssembyList loadedAssemblies
 
static List< System.Type > loadedTypes
 

Member Function Documentation

static void AssemblyLoader.ClearPlugins ( )
inlinestatic
static void AssemblyLoader.FlagDuplicatedPlugins ( )
inlinestatic

Goes through the cached assembly information and flags duplicate plugins.

static System.Type AssemblyLoader.GetClassByName ( System.Type  baseType,
string  name 
)
inlinestatic

Retrieves a class of base type T from the loaded types

Template Parameters
TBaseType
Parameters
nameName of type to retrieve
Returns
Type cast to BaseType on success or null on failure
static List<ConstructorInfo> AssemblyLoader.GetModulesImplementingInterface< T > ( System.Type[]  param_types)
inlinestatic
Type Constraints
T :class 
static string AssemblyLoader.GetPathByType ( System.Type  type)
inlinestatic

Retrieves the relative assembly path from a type contained therein

Parameters
type
Returns
static List<Type> AssemblyLoader.GetSubclassesOfParentClass ( Type  parentType)
inlinestatic

Get a list of subclasses of the parent class.

Parameters
parentTypeType representing the parent class.
Returns
Returns a list of the subclasses of the parent class. The parent will not be included in the list.
static List<Type> AssemblyLoader.GetTypesOfClassesImplementingInterface< T > ( )
inlinestatic

Get a list of classes which implement a specified interface.

Returns
Returns a list of the classes which implement the specified interface T.
Type Constraints
T :class 
static void AssemblyLoader.Initialize ( string[]  baseTypes)
inlinestatic

Initialize the AssemblyLoader from array of string type names

Parameters
baseTypes
static void AssemblyLoader.Initialize ( System.Type[]  baseTypes)
inlinestatic

Initialize the AssemblyLoader from array of types

Parameters
baseTypes

< Define forbiddens.

< Load the base assembly

static void AssemblyLoader.LoadAssemblies ( )
inlinestatic

< via IgorZ, see above

< just in case

< Iterate through types in the assembly

< Report additional info if it's a ReflectionTypeLoadException.

< make the assembly null so we can remove it from the list later

static bool AssemblyLoader.LoadPlugin ( FileInfo  file,
string  url,
ConfigNode  assemblyNode 
)
inlinestatic

Load a plugin from given FileInfo

Returns
true/false of success
static void AssemblyLoader.LoadPluginInfo ( FileInfo  file,
string  url,
ConfigNode  assemblyNode 
)
inlinestatic

Load and cache relevant plugin info, such as name, path and version

Member Data Documentation

LoadedAssembyList AssemblyLoader.loadedAssemblies
static
List<System.Type> AssemblyLoader.loadedTypes
static

The documentation for this class was generated from the following file: