C# Class GDSX.Externals.LinqPad.Driver.MongoDynamicDataContextDriver

Inheritance: LINQPad.Extensibility.DataContext.DynamicDataContextDriver
Afficher le fichier Open project: gburgett/LinqPad-mongo-driver Class Usage Examples

Méthodes publiques

Свойство Type Description
CommonTypes Type>.Dictionary

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

BuildAssembly() public méthode

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
Résultat void

BuildSchema() public méthode

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.
Résultat List

GenerateCustomInitQuery() public méthode

public GenerateCustomInitQuery ( LinqPadQuery query, string nameSpace ) : string
query LinqPadQuery
nameSpace string
Résultat string

GenerateDynamicCode() public méthode

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
Résultat string

GetAssembliesToAdd() public méthode

Gets the additional assemblies that the Driver will require at runtime
public GetAssembliesToAdd ( IConnectionInfo cxInfo ) : IEnumerable
cxInfo IConnectionInfo the serialized connection properties.
Résultat IEnumerable

GetConnectionDescription() public méthode

public GetConnectionDescription ( IConnectionInfo cxInfo ) : string
cxInfo IConnectionInfo
Résultat string

GetContextConstructorArguments() public méthode

Gets the arguments that are passed to the dynamically instantiated driver
public GetContextConstructorArguments ( IConnectionInfo cxInfo ) : object[]
cxInfo IConnectionInfo the serialized connection properties.
Résultat object[]

GetContextConstructorParameters() public méthode

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.
Résultat ParameterDescriptor[]

GetNamespacesToAdd() public static méthode

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.
Résultat IEnumerable

GetNamespacesToAdd() public méthode

Gets the additional namespaces that should be imported for queries using this driver
public GetNamespacesToAdd ( IConnectionInfo cxInfo ) : IEnumerable
cxInfo IConnectionInfo the serialized connection properties.
Résultat IEnumerable

GetSchemaAndBuildAssembly() public méthode

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
Résultat List

GetStaticCodeFiles() public méthode

Loads up the Static code files which should be built with the dynamic driver as strings
public GetStaticCodeFiles ( ) : IEnumerable
Résultat IEnumerable

InitializeContext() public méthode

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
Résultat void

ShowConnectionDialog() public méthode

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
Résultat bool

TearDownContext() public méthode

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
Résultat void

Property Details

CommonTypes public_oe static_oe property

Types common to all Bson driver instances
public static Dictionary CommonTypes
Résultat Type>.Dictionary