C# Класс GDSX.Externals.LinqPad.Driver.MongoDynamicDataContextDriver

Наследование: LINQPad.Extensibility.DataContext.DynamicDataContextDriver
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CommonTypes Type>.Dictionary

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

Метод Описание
BuildAssembly ( ConnectionProperties props, IEnumerable code, AssemblyName name, Func GetDriverFolder ) : void

Compiles the assembly from the code files loaded as strings.

BuildSchema ( ConnectionProperties props, List assemblies ) : List

Builds the Schema tree for display to the user

GenerateCustomInitQuery ( LinqPadQuery query, string nameSpace ) : string
GenerateDynamicCode ( ConnectionProperties props, List assemblies, string nameSpace, string typeName ) : string

Generates the Dynamic Driver class as a string of code to be compiled.

GetAssembliesToAdd ( IConnectionInfo cxInfo ) : IEnumerable

Gets the additional assemblies that the Driver will require at runtime

GetConnectionDescription ( IConnectionInfo cxInfo ) : string
GetContextConstructorArguments ( IConnectionInfo cxInfo ) : object[]

Gets the arguments that are passed to the dynamically instantiated driver

GetContextConstructorParameters ( IConnectionInfo cxInfo ) : ParameterDescriptor[]

Gets an array describing the types of objects that will be passed into the dynamically instantiated driver

GetNamespacesToAdd ( ConnectionProperties props ) : IEnumerable

Gets the additional namespaces that should be imported for queries using this driver

GetNamespacesToAdd ( IConnectionInfo cxInfo ) : IEnumerable

Gets the additional namespaces that should be imported for queries using this driver

GetSchemaAndBuildAssembly ( IConnectionInfo cxInfo, AssemblyName assemblyToBuild, string &nameSpace, string &typeName ) : List

Creates the Schema which displays information about the connection to the user, and dynamically generates the driver as an assembly.

GetStaticCodeFiles ( ) : IEnumerable

Loads up the Static code files which should be built with the dynamic driver as strings

InitializeContext ( IConnectionInfo cxInfo, object context, LINQPad.Extensibility.DataContext.QueryExecutionManager executionManager ) : void

Initializes the driver after it has been instantiated.

ShowConnectionDialog ( IConnectionInfo cxInfo, bool isNewConnection ) : bool

LinqPad calls this to display the Connection Options dialog & generate the connection properties.

TearDownContext ( IConnectionInfo cxInfo, object context, LINQPad.Extensibility.DataContext.QueryExecutionManager executionManager, object constructorArguments ) : void

Called when the Driver context is torn down to clean up resources

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

Метод Описание
DoPluralize ( string s ) : string
TryLoadType ( IEnumerable assemblies, string typeName ) : Type

Gets the requested type name out of one of the loaded assemblies, or null if it can't be found

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

BuildAssembly() публичный Метод

Compiles the assembly from the code files loaded as strings.
public BuildAssembly ( ConnectionProperties props, IEnumerable code, AssemblyName name, Func GetDriverFolder ) : void
props ConnectionProperties The deserialized Connection Properties
code IEnumerable The loaded strings of C# code
name System.Reflection.AssemblyName The location where the dynamically generated assembly should be created
GetDriverFolder Func An injected function that gets the LinqPad driver folder
Результат void

BuildSchema() публичный Метод

Builds the Schema tree for display to the user
public BuildSchema ( ConnectionProperties props, List assemblies ) : List
props ConnectionProperties The deserialized Connection Properties
assemblies List The already-loaded assemblies.
Результат List

GenerateCustomInitQuery() публичный Метод

public GenerateCustomInitQuery ( LinqPadQuery query, string nameSpace ) : string
query LinqPadQuery
nameSpace string
Результат string

GenerateDynamicCode() публичный Метод

Generates the Dynamic Driver class as a string of code to be compiled.
public GenerateDynamicCode ( ConnectionProperties props, List assemblies, string nameSpace, string typeName ) : string
props ConnectionProperties The deserialized Connection Properties
assemblies List The already-loaded assemblies.
nameSpace string The namespace of the driver class
typeName string The name of the driver class
Результат string

GetAssembliesToAdd() публичный Метод

Gets the additional assemblies that the Driver will require at runtime
public GetAssembliesToAdd ( IConnectionInfo cxInfo ) : IEnumerable
cxInfo IConnectionInfo the serialized connection properties.
Результат IEnumerable

GetConnectionDescription() публичный Метод

public GetConnectionDescription ( IConnectionInfo cxInfo ) : string
cxInfo IConnectionInfo
Результат string

GetContextConstructorArguments() публичный Метод

Gets the arguments that are passed to the dynamically instantiated driver
public GetContextConstructorArguments ( IConnectionInfo cxInfo ) : object[]
cxInfo IConnectionInfo the serialized connection properties.
Результат object[]

GetContextConstructorParameters() публичный Метод

Gets an array describing the types of objects that will be passed into the dynamically instantiated driver
public GetContextConstructorParameters ( IConnectionInfo cxInfo ) : ParameterDescriptor[]
cxInfo IConnectionInfo the serialized connection properties.
Результат ParameterDescriptor[]

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

Gets the additional namespaces that should be imported for queries using this driver
public static GetNamespacesToAdd ( ConnectionProperties props ) : IEnumerable
props ConnectionProperties the deserialized ConnectionProperties object.
Результат IEnumerable

GetNamespacesToAdd() публичный Метод

Gets the additional namespaces that should be imported for queries using this driver
public GetNamespacesToAdd ( IConnectionInfo cxInfo ) : IEnumerable
cxInfo IConnectionInfo the serialized connection properties.
Результат IEnumerable

GetSchemaAndBuildAssembly() публичный Метод

Creates the Schema which displays information about the connection to the user, and dynamically generates the driver as an assembly.
public GetSchemaAndBuildAssembly ( IConnectionInfo cxInfo, AssemblyName assemblyToBuild, string &nameSpace, string &typeName ) : List
cxInfo IConnectionInfo the serialized connection properties.
assemblyToBuild System.Reflection.AssemblyName The location where the dynamically generated assembly should be created
nameSpace string The namespace of the driver class
typeName string The name of the driver class
Результат List

GetStaticCodeFiles() публичный Метод

Loads up the Static code files which should be built with the dynamic driver as strings
public GetStaticCodeFiles ( ) : IEnumerable
Результат IEnumerable

InitializeContext() публичный Метод

Initializes the driver after it has been instantiated.
public InitializeContext ( IConnectionInfo cxInfo, object context, LINQPad.Extensibility.DataContext.QueryExecutionManager executionManager ) : void
cxInfo IConnectionInfo the serialized connection properties.
context object The driver object
executionManager LINQPad.Extensibility.DataContext.QueryExecutionManager The current Query Execution Manager for this query
Результат void

ShowConnectionDialog() публичный Метод

LinqPad calls this to display the Connection Options dialog & generate the connection properties.
public ShowConnectionDialog ( IConnectionInfo cxInfo, bool isNewConnection ) : bool
cxInfo IConnectionInfo the serialized connection properties.
isNewConnection bool True if this is a brand new connection
Результат bool

TearDownContext() публичный Метод

Called when the Driver context is torn down to clean up resources
public TearDownContext ( IConnectionInfo cxInfo, object context, LINQPad.Extensibility.DataContext.QueryExecutionManager executionManager, object constructorArguments ) : void
cxInfo IConnectionInfo
context object
executionManager LINQPad.Extensibility.DataContext.QueryExecutionManager
constructorArguments object
Результат void

Описание свойств

CommonTypes публичное статическое свойство

Types common to all Bson driver instances
public static Dictionary CommonTypes
Результат Type>.Dictionary