C# Class VelocityDBAccess.SchemaExtractor

Class able to extract SquemaInfo from assemblies.
Inheritance: System.MarshalByRefObject
Show file Open project: VelocityDB/VelocityDB Class Usage Examples

Public Methods

Method Description
Extract ( string pClassesFilenames, string pDependenciesFilenames ) : SchemaInfo

Extract schema information from assemblies.

GetDataMembers ( Type pType ) : List

Gets public instance fields and properties excluding ones internally defined by VelocityDB.

Private Methods

Method Description
AssemblyResolve ( object sender, ResolveEventArgs pArgs ) : Assembly

When an assembly is not found, search for it on the already loaded ones.

CreateNamesDictionary ( Type pPersistables, SchemaInfo &pSchema ) : void

Creates dictionaries that maps from types full names to a suitable collection name. The resulting name is usually simple the name of the type. When there is more than one type with the same name, FullName is progressively perpended to name until there is no ambiguity. Two dictionaries are generated, one with pluralized last name and one with singular one.

GetAssembliesAndTypes ( string pClassFilenames, string pDependencyFilenames, SchemaInfo &pSchema ) : void

Load assemblies and get exported persistable types from them.

GetAssembliesAndTypesHelper ( string pClassFilenames, string pDependencyFilenames, List &pAssemblyNames, List &pTypes, List &pActualDependencies ) : void

Internal method to be used on a clean domain.

GetLoadedAssemblies ( ) : string[]

Gets filename of all non-dynamic loaded assemblies.

SolveNameClash ( Type>.IGrouping pNameClash ) : string[]>.Dictionary

From types with the same Name, create new names progressively using FullName to disambiguate.

Method Details

Extract() public static method

Extract schema information from assemblies.
public static Extract ( string pClassesFilenames, string pDependenciesFilenames ) : SchemaInfo
pClassesFilenames string Assemblies containing /// desired persistable types.
pDependenciesFilenames string Assemblies required by /// pClassesFilenames Assemblies.
return SchemaInfo

GetDataMembers() public static method

Gets public instance fields and properties excluding ones internally defined by VelocityDB.
public static GetDataMembers ( Type pType ) : List
pType System.Type
return List