C# Класс DatabaseManager.SchemaExtractor

Class able to extract SquemaInfo from assemblies.
Наследование: System.MarshalByRefObject
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

GetTypeFromAnyAssemblyVersion ( string typeName ) : Type

Load type using Type.GetType(string), and if fails, attempt to load same type from an assembly by assembly name, without specifying assembly version or any other part of the signature

Приватные методы

Метод Описание
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 fullnames 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 prepended 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.

OnAssemblyResolve ( object sender, ResolveEventArgs args ) : Assembly
SolveNameClash ( Type>.IGrouping pNameClash ) : string[]>.Dictionary

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

Описание методов

Extract() публичный статический Метод

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.
Результат SchemaInfo

GetDataMembers() публичный статический Метод

Gets public instance fields and properties excluding ones internally defined by VelocityDB.
public static GetDataMembers ( Type pType ) : List
pType System.Type
Результат List

GetTypeFromAnyAssemblyVersion() публичный статический Метод

Load type using Type.GetType(string), and if fails, attempt to load same type from an assembly by assembly name, without specifying assembly version or any other part of the signature
public static GetTypeFromAnyAssemblyVersion ( string typeName ) : Type
typeName string /// The assembly-qualified name of the type to get. /// See System.Type.AssemblyQualifiedName. /// If the type is in the currently executing assembly or in Mscorlib.dll, it /// is sufficient to supply the type name qualified by its namespace. ///
Результат System.Type