C# Class VelocityDB.LINQPad.VelocityDBDynamicDriver

Inheritance: LINQPad.Extensibility.DataContext.DynamicDataContextDriver
Show file Open project: VelocityDB/VelocityDB Class Usage Examples

Public Methods

Method Description
DisplayObjectInGrid ( object objectToDisplay, GridOptions options ) : void
GetAssembliesToAdd ( IConnectionInfo pCxInfo ) : IEnumerable

Returns a list of additional assemblies to reference when building queries. To refer to an assembly in the GAC, specify its fully qualified name, otherwise specified the assembly's full location on the hard drive. Assemblies in the same folder as the driver, however, don't require a folder name. If you're unable to find the necessary assemblies, throw an exception, with a message indicating the problem assembly.

GetConnectionDescription ( IConnectionInfo pCxInfo ) : string
GetCustomDisplayMemberProvider ( object objectToWrite ) : ICustomMemberProvider

Allows you to change how types are displayed in the output window - in particular, this lets you prevent LINQPad from endlessly enumerating lazily evaluated properties. Overriding this method is an alternative to implementing ICustomMemberProvider in the target types. See http://www.linqpad.net/FAQ.aspx#extensibility for more info.

GetNamespacesToAdd ( IConnectionInfo pCxInfo ) : IEnumerable

Returns a list of additional namespaces that should be imported automatically into all queries that use this driver. This should include the commonly used namespaces of your ORM or querying technology .

GetSchemaAndBuildAssembly ( IConnectionInfo pCxInfo, AssemblyName pAssemblyToBuild, string &pNameSpace, string &pTypeName ) : List

Builds an assembly containing a typed data pContext, and returns data for the Schema Explorer.

ShowConnectionDialog ( IConnectionInfo pCxInfo, bool pIsNewConnection ) : bool

Displays a dialog prompting the user for connection details. The isNewConnection parameter will be true if the user is creating a new connection rather than editing an existing connection. This should return true if the user clicked OK. If it returns false, any changes to the IConnectionInfo object will be rolled back.

TearDownContext ( IConnectionInfo pCxInfo, object pContext, LINQPad.Extensibility.DataContext.QueryExecutionManager pExecutionManager, object pConstructorArguments ) : void

This virtual method is called after a query has completed. You can use this hook to perform cleanup activities such as disposing of the context or other objects.

Method Details

DisplayObjectInGrid() public method

public DisplayObjectInGrid ( object objectToDisplay, GridOptions options ) : void
objectToDisplay object
options GridOptions
return void

GetAssembliesToAdd() public method

Returns a list of additional assemblies to reference when building queries. To refer to an assembly in the GAC, specify its fully qualified name, otherwise specified the assembly's full location on the hard drive. Assemblies in the same folder as the driver, however, don't require a folder name. If you're unable to find the necessary assemblies, throw an exception, with a message indicating the problem assembly.
public GetAssembliesToAdd ( IConnectionInfo pCxInfo ) : IEnumerable
pCxInfo IConnectionInfo
return IEnumerable

GetConnectionDescription() public method

public GetConnectionDescription ( IConnectionInfo pCxInfo ) : string
pCxInfo IConnectionInfo
return string

GetCustomDisplayMemberProvider() public method

Allows you to change how types are displayed in the output window - in particular, this lets you prevent LINQPad from endlessly enumerating lazily evaluated properties. Overriding this method is an alternative to implementing ICustomMemberProvider in the target types. See http://www.linqpad.net/FAQ.aspx#extensibility for more info.
public GetCustomDisplayMemberProvider ( object objectToWrite ) : ICustomMemberProvider
objectToWrite object
return ICustomMemberProvider

GetNamespacesToAdd() public method

Returns a list of additional namespaces that should be imported automatically into all queries that use this driver. This should include the commonly used namespaces of your ORM or querying technology .
public GetNamespacesToAdd ( IConnectionInfo pCxInfo ) : IEnumerable
pCxInfo IConnectionInfo
return IEnumerable

GetSchemaAndBuildAssembly() public method

Builds an assembly containing a typed data pContext, and returns data for the Schema Explorer.
public GetSchemaAndBuildAssembly ( IConnectionInfo pCxInfo, AssemblyName pAssemblyToBuild, string &pNameSpace, string &pTypeName ) : List
pCxInfo IConnectionInfo Connection information, as entered by the user
pAssemblyToBuild System.Reflection.AssemblyName Name and location of the target assembly to build
pNameSpace string The suggested namespace of the typed data pContext. You must update this /// parameter if you don't use the suggested namespace.
pTypeName string The suggested type name of the typed data pContext. You must update this /// parameter if you don't use the suggested type name.
return List

ShowConnectionDialog() public method

Displays a dialog prompting the user for connection details. The isNewConnection parameter will be true if the user is creating a new connection rather than editing an existing connection. This should return true if the user clicked OK. If it returns false, any changes to the IConnectionInfo object will be rolled back.
public ShowConnectionDialog ( IConnectionInfo pCxInfo, bool pIsNewConnection ) : bool
pCxInfo IConnectionInfo
pIsNewConnection bool
return bool

TearDownContext() public method

This virtual method is called after a query has completed. You can use this hook to perform cleanup activities such as disposing of the context or other objects.
public TearDownContext ( IConnectionInfo pCxInfo, object pContext, LINQPad.Extensibility.DataContext.QueryExecutionManager pExecutionManager, object pConstructorArguments ) : void
pCxInfo IConnectionInfo
pContext object
pExecutionManager LINQPad.Extensibility.DataContext.QueryExecutionManager
pConstructorArguments object
return void