コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlQueryExecutor"/> class
 /// by using the given sql connection provider and default command type.
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> that can be used to create
 /// connections for a sql server.
 /// </param>
 /// <param name="default_command_type">
 /// The <see cref="CommandType"/> to be used when executing a
 /// method that does not contain a parameter of that type.
 /// </param>
 public SqlQueryExecutor(SqlConnectionProvider sql_connection_provider,
                         CommandType default_command_type = CommandType.Text)
 {
     sql_connection_provider_ = sql_connection_provider;
     default_command_type_    = default_command_type;
     logger_ = MustLogger.ForCurrentProcess;
     cache_  = new ConcurrentDictionary <string, object>();
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransactionContext"/>
 /// using the specified <see cref="IDbConnection"/> object.
 /// </summary>
 /// <param name="connection"></param>
 public TransactionContext(IDbConnection connection)
 {
     if (connection == null)
     {
         throw new ArgumentNullException("connection");
     }
     connection_ = connection;
     commands_   = new Queue <EnlistedCommand>();
     logger_     = MustLogger.ForCurrentProcess;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetIfGreaterThanQuery"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlCeConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public SetIfLessThanQuery(SqlCeConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_             = MustLogger.ForCurrentProcess;
     SupressTransactions = true;
 }
コード例 #4
0
ファイル: CreateTableQuery.cs プロジェクト: ddd-cqrs-es/must
 public CreateTableQuery(SqlCeConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_       = MustLogger.ForCurrentProcess;
     table_exists_ = new TableExistsQuery(sql_connection_provider);
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetStateCommand"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public SetStateCommand(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_ = MustLogger.ForCurrentProcess;
 }
コード例 #6
0
ファイル: TableExistsQuery.cs プロジェクト: ddd-cqrs-es/must
 public TableExistsQuery(SqlCeConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_ = MustLogger.ForCurrentProcess;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransactionContext"/>
 /// using the specified <see cref="IDbConnection"/> object.
 /// </summary>
 /// <param name="connection"></param>
 protected TransactionContext(IDbConnection connection)
 {
     connection_ = connection;
     commands_   = new List <IDbCommand>();
     logger_     = MustLogger.ForCurrentProcess;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StateByNameQuery"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public StateByNameQuery(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_ = MustLogger.ForCurrentProcess;
 }
コード例 #9
0
 public RemoveStateQuery(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_             = MustLogger.ForCurrentProcess;
     SupressTransactions = true;
 }
コード例 #10
0
ファイル: NextHiQuery.cs プロジェクト: brumschlag/nohros-must
 /// <summary>
 /// Initializes a new instance of the <see cref="NextHiQuery"/>
 /// using the given <param ref="sql_connection_provider" />
 /// </summary>
 /// <param name="sql_connection_provider">
 /// A <see cref="SqlConnectionProvider"/> object that can be used to
 /// create connections to the data provider.
 /// </param>
 public NextHiQuery(SqlConnectionProvider sql_connection_provider)
 {
     sql_connection_provider_ = sql_connection_provider;
     logger_ = MustLogger.ForCurrentProcess;
     mapper_ = CreateMapper();
 }