C# Класс IdeaBlade.Drivers.DevForceLINQPadDriver

A LINQPad driver for DevForce entity models. This driver is based on the UniversalStaticDriver sample from LINQPad. LINQPad will new a "context", your EntityManager, each time a query is run. It will also use (at least) one AppDomain per query tab. You'll sometimes see a new AppDomain has been created when you least expect it - so watch out. It' important to not lock the model assembly - one of the nice features of LINQPad is that you can change your model and rebuild without the assembly being locked, and LINQPad will also (eventually) refresh to show your model changes. This driver does not have any static references to DevForce assemblies - but it does use reflection to load them.
Наследование: LINQPad.Extensibility.DataContext.StaticDataContextDriver
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
EnableSqlLogging bool
InitializeLogger void

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

Метод Описание
AreRepositoriesEquivalent ( IConnectionInfo c1, IConnectionInfo c2 ) : bool
GetAssembliesToAdd ( ) : IEnumerable

Add DevForce assemblies.

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

We're using the parameterless EM constructor, so no constructor arguments are provided.

GetContextConstructorParameters ( IConnectionInfo cxInfo ) : ParameterDescriptor[]

Use the default parameterless EntityManager constructor. After construction we can set some EM properties in the InitializeContext method.

GetCustomDisplayMemberProvider ( object objectToWrite ) : LINQPad.ICustomMemberProvider

To avoid walking the entire entity graph we use a custom provider.

GetNamespacesToAdd ( ) : IEnumerable

Add DevForce namespaces.

GetNamespacesToRemove ( ) : IEnumerable

Remove the default Linq to SQL namespaces.

GetSchema ( IConnectionInfo cxInfo, Type customType ) : List

Returns the schema for the EntityManager, showing EntityQueries and sprocs.

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

This is called after the EM is constructed.

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

Populate SQL tab if sql logging is wanted.

ShowConnectionDialog ( IConnectionInfo cxInfo, bool isNewConnection ) : bool

This opens the standard connection dialog (heavily based on the Universal demo driver).

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

Метод Описание
EnableSqlLogging ( IConnectionInfo cxinfo ) : bool
InitializeLogger ( IConnectionInfo cxinfo ) : void

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

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

public AreRepositoriesEquivalent ( IConnectionInfo c1, IConnectionInfo c2 ) : bool
c1 IConnectionInfo
c2 IConnectionInfo
Результат bool

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

Add DevForce assemblies.
public GetAssembliesToAdd ( ) : IEnumerable
Результат IEnumerable

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

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

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

We're using the parameterless EM constructor, so no constructor arguments are provided.
public GetContextConstructorArguments ( IConnectionInfo cxInfo ) : object[]
cxInfo IConnectionInfo
Результат object[]

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

Use the default parameterless EntityManager constructor. After construction we can set some EM properties in the InitializeContext method.
public GetContextConstructorParameters ( IConnectionInfo cxInfo ) : ParameterDescriptor[]
cxInfo IConnectionInfo
Результат ParameterDescriptor[]

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

To avoid walking the entire entity graph we use a custom provider.
public GetCustomDisplayMemberProvider ( object objectToWrite ) : LINQPad.ICustomMemberProvider
objectToWrite object
Результат LINQPad.ICustomMemberProvider

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

Add DevForce namespaces.
public GetNamespacesToAdd ( ) : IEnumerable
Результат IEnumerable

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

Remove the default Linq to SQL namespaces.
public GetNamespacesToRemove ( ) : IEnumerable
Результат IEnumerable

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

Returns the schema for the EntityManager, showing EntityQueries and sprocs.
public GetSchema ( IConnectionInfo cxInfo, Type customType ) : List
cxInfo IConnectionInfo
customType System.Type
Результат List

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

This is called after the EM is constructed.
public InitializeContext ( IConnectionInfo cxInfo, object context, LINQPad.Extensibility.DataContext.QueryExecutionManager executionManager ) : void
cxInfo IConnectionInfo
context object
executionManager LINQPad.Extensibility.DataContext.QueryExecutionManager
Результат void

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

Populate SQL tab if sql logging is wanted.
public OnQueryFinishing ( IConnectionInfo cxInfo, object context, LINQPad.Extensibility.DataContext.QueryExecutionManager executionManager ) : void
cxInfo IConnectionInfo
context object
executionManager LINQPad.Extensibility.DataContext.QueryExecutionManager
Результат void

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

This opens the standard connection dialog (heavily based on the Universal demo driver).
public ShowConnectionDialog ( IConnectionInfo cxInfo, bool isNewConnection ) : bool
cxInfo IConnectionInfo
isNewConnection bool
Результат bool