C# 클래스 Tortuga.Chain.SqlServerDataSource

Class SqlServerDataSource.
상속: SqlServerDataSourceBase, IRootDataSource
파일 보기 프로젝트 열기: docevaad/Chain 1 사용 예제들

Private Properties

프로퍼티 타입 설명
BuildConnectionSettingsOverride string
CreateConnection System.Data.SqlClient.SqlConnection
CreateConnectionAsync Task
Execute int?
GetEffectiveSettings Tortuga.Chain.SqlServer.SqlServerEffectiveSettings
GetEffectiveSettingsAsync Task
IRootDataSource System.Data.Common.DbConnection
IRootDataSource IOpenDataSource
IRootDataSource ITransactionalDataSource
IRootDataSource Task
IRootDataSource Task
SqlServerDataSource System

공개 메소드들

메소드 설명
BeginTransaction ( string transactionName = null, IsolationLevel isolationLevel = null, bool forwardEvents = true ) : SqlServerTransactionalDataSource

Creates a new transaction

the caller of this function is responsible for closing the transaction.

BeginTransactionAsync ( string transactionName = null, IsolationLevel isolationLevel = null, bool forwardEvents = true ) : Task

Creates a new transaction

CreateFromConfig ( string connectionName ) : SqlServerDataSource

Creates a new connection using the connection string settings in the app.config file.

SqlServerDataSource ( System.Data.SqlClient.SqlConnectionStringBuilder connectionStringBuilder, SqlServerDataSourceSettings settings = null ) : System

Initializes a new instance of the SqlServerDataSource class.

SqlServerDataSource ( string name, System.Data.SqlClient.SqlConnectionStringBuilder connectionStringBuilder, SqlServerDataSourceSettings settings = null ) : System

Initializes a new instance of the SqlServerDataSource class.

SqlServerDataSource ( string connectionString, SqlServerDataSourceSettings settings = null ) : System

Initializes a new instance of the SqlServerDataSource class.

SqlServerDataSource ( string name, string connectionString, SqlServerDataSourceSettings settings = null ) : System

Initializes a new instance of the SqlServerDataSource class.

StartSqlDependency ( ) : bool

Starts SQL dependency.

true if the listener initialized successfully; false if a compatible listener already exists.

StopSqlDependency ( ) : bool

Stops SQL dependency.

true if the listener was completely stopped; false if the System.AppDomain was unbound from the listener, but there are is at least one other System.AppDomain using the same listener.

TestConnection ( ) : void

Tests the connection.

TestConnectionAsync ( ) : Task

Tests the connection asynchronously.

WithCache ( ICacheAdapter cache ) : SqlServerDataSource

Craetes a new data source with the provided cache.

WithRules ( ) : SqlServerDataSource

Creates a new data source with additional audit rules.

WithRules ( IEnumerable additionalRules ) : SqlServerDataSource

Creates a new data source with additional audit rules.

WithSettings ( SqlServerDataSourceSettings settings ) : SqlServerDataSource

Creates a new data source with the indicated changes to the settings.

The new data source will share the same database metadata cache.

WithUser ( object userValue ) : SqlServerDataSource

Creates a new data source with the indicated user.

This is used in conjunction with audit rules.

보호된 메소드들

메소드 설명
Execute ( SqlTransaction>.OperationExecutionToken executionToken, SqlTransaction>.OperationImplementation implementation, object state ) : int?

Executes the specified operation.

ExecuteAsync ( SqlParameter>.CommandExecutionToken executionToken, CommandImplementationAsync implementation, CancellationToken cancellationToken, object state ) : Task

Execute the operation asynchronously.

ExecuteAsync ( SqlTransaction>.OperationExecutionToken executionToken, SqlTransaction>.OperationImplementationAsync implementation, CancellationToken cancellationToken, object state ) : Task

Execute the operation asynchronously.

비공개 메소드들

메소드 설명
BuildConnectionSettingsOverride ( ) : string
CreateConnection ( ) : SqlConnection
CreateConnectionAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

Creates and opens a SQL connection.

The caller of this method is responsible for closing the connection.

Execute ( SqlParameter>.CommandExecutionToken executionToken, CommandImplementation implementation, object state ) : int?
GetEffectiveSettings ( ) : SqlServerEffectiveSettings
GetEffectiveSettingsAsync ( ) : Task
IRootDataSource ( ) : DbConnection
IRootDataSource ( DbConnection connection, DbTransaction transaction ) : IOpenDataSource
IRootDataSource ( ) : ITransactionalDataSource
IRootDataSource ( ) : Task
IRootDataSource ( ) : Task
SqlServerDataSource ( string name, System.Data.SqlClient.SqlConnectionStringBuilder connectionStringBuilder, SqlServerDataSourceSettings settings, SqlServerMetadataCache databaseMetadata, ICacheAdapter cache, object>.ConcurrentDictionary extensionCache ) : System

메소드 상세

BeginTransaction() 공개 메소드

Creates a new transaction
the caller of this function is responsible for closing the transaction.
public BeginTransaction ( string transactionName = null, IsolationLevel isolationLevel = null, bool forwardEvents = true ) : SqlServerTransactionalDataSource
transactionName string optional name of the transaction.
isolationLevel IsolationLevel the isolation level. if not supplied, will use the database default.
forwardEvents bool if true, logging events are forwarded to the parent connection.
리턴 SqlServerTransactionalDataSource

BeginTransactionAsync() 공개 메소드

Creates a new transaction
public BeginTransactionAsync ( string transactionName = null, IsolationLevel isolationLevel = null, bool forwardEvents = true ) : Task
transactionName string Name of the transaction.
isolationLevel IsolationLevel The isolation level.
forwardEvents bool if set to true [forward events].
리턴 Task

CreateFromConfig() 공개 정적인 메소드

Creates a new connection using the connection string settings in the app.config file.
public static CreateFromConfig ( string connectionName ) : SqlServerDataSource
connectionName string
리턴 SqlServerDataSource

Execute() 보호된 메소드

Executes the specified operation.
protected Execute ( SqlTransaction>.OperationExecutionToken executionToken, SqlTransaction>.OperationImplementation implementation, object state ) : int?
executionToken SqlTransaction>.OperationExecutionToken The execution token.
implementation SqlTransaction>.OperationImplementation The implementation.
state object The state.
리턴 int?

ExecuteAsync() 보호된 메소드

Execute the operation asynchronously.
protected ExecuteAsync ( SqlParameter>.CommandExecutionToken executionToken, CommandImplementationAsync implementation, CancellationToken cancellationToken, object state ) : Task
executionToken SqlParameter>.CommandExecutionToken The execution token.
implementation CommandImplementationAsync The implementation that handles processing the result of the command.
cancellationToken System.Threading.CancellationToken The cancellation token.
state object User supplied state.
리턴 Task

ExecuteAsync() 보호된 메소드

Execute the operation asynchronously.
protected ExecuteAsync ( SqlTransaction>.OperationExecutionToken executionToken, SqlTransaction>.OperationImplementationAsync implementation, CancellationToken cancellationToken, object state ) : Task
executionToken SqlTransaction>.OperationExecutionToken The execution token.
implementation SqlTransaction>.OperationImplementationAsync The implementation.
cancellationToken System.Threading.CancellationToken The cancellation token.
state object The state.
리턴 Task

SqlServerDataSource() 공개 메소드

Initializes a new instance of the SqlServerDataSource class.
public SqlServerDataSource ( System.Data.SqlClient.SqlConnectionStringBuilder connectionStringBuilder, SqlServerDataSourceSettings settings = null ) : System
connectionStringBuilder System.Data.SqlClient.SqlConnectionStringBuilder The connection string builder.
settings Tortuga.Chain.SqlServer.SqlServerDataSourceSettings Optional settings object.
리턴 System

SqlServerDataSource() 공개 메소드

Initializes a new instance of the SqlServerDataSource class.
connectionStringBuilder;connectionStringBuilder is null.
public SqlServerDataSource ( string name, System.Data.SqlClient.SqlConnectionStringBuilder connectionStringBuilder, SqlServerDataSourceSettings settings = null ) : System
name string Optional name of the data source.
connectionStringBuilder System.Data.SqlClient.SqlConnectionStringBuilder The connection string builder.
settings Tortuga.Chain.SqlServer.SqlServerDataSourceSettings Optional settings object.
리턴 System

SqlServerDataSource() 공개 메소드

Initializes a new instance of the SqlServerDataSource class.
connectionString is null or empty.;connectionString
public SqlServerDataSource ( string connectionString, SqlServerDataSourceSettings settings = null ) : System
connectionString string The connection string.
settings Tortuga.Chain.SqlServer.SqlServerDataSourceSettings Optional settings object.
리턴 System

SqlServerDataSource() 공개 메소드

Initializes a new instance of the SqlServerDataSource class.
connectionString is null or empty.;connectionString
public SqlServerDataSource ( string name, string connectionString, SqlServerDataSourceSettings settings = null ) : System
name string Name of the data source.
connectionString string The connection string.
settings Tortuga.Chain.SqlServer.SqlServerDataSourceSettings Optional settings object.
리턴 System

StartSqlDependency() 공개 메소드

Starts SQL dependency.
true if the listener initialized successfully; false if a compatible listener already exists.
public StartSqlDependency ( ) : bool
리턴 bool

StopSqlDependency() 공개 메소드

Stops SQL dependency.
true if the listener was completely stopped; false if the System.AppDomain was unbound from the listener, but there are is at least one other System.AppDomain using the same listener.
public StopSqlDependency ( ) : bool
리턴 bool

TestConnection() 공개 메소드

Tests the connection.
public TestConnection ( ) : void
리턴 void

TestConnectionAsync() 공개 메소드

Tests the connection asynchronously.
public TestConnectionAsync ( ) : Task
리턴 Task

WithCache() 공개 메소드

Craetes a new data source with the provided cache.
public WithCache ( ICacheAdapter cache ) : SqlServerDataSource
cache ICacheAdapter The cache.
리턴 SqlServerDataSource

WithRules() 공개 메소드

Creates a new data source with additional audit rules.
public WithRules ( ) : SqlServerDataSource
리턴 SqlServerDataSource

WithRules() 공개 메소드

Creates a new data source with additional audit rules.
public WithRules ( IEnumerable additionalRules ) : SqlServerDataSource
additionalRules IEnumerable The additional rules.
리턴 SqlServerDataSource

WithSettings() 공개 메소드

Creates a new data source with the indicated changes to the settings.
The new data source will share the same database metadata cache.
public WithSettings ( SqlServerDataSourceSettings settings ) : SqlServerDataSource
settings Tortuga.Chain.SqlServer.SqlServerDataSourceSettings The new settings to use.
리턴 SqlServerDataSource

WithUser() 공개 메소드

Creates a new data source with the indicated user.
This is used in conjunction with audit rules.
public WithUser ( object userValue ) : SqlServerDataSource
userValue object The user value.
리턴 SqlServerDataSource