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
파일 보기 프로젝트 열기: IdeaBlade/DevForce.Utilities

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