Esempio n. 1
0
 internal BatchConfiguration(IUnitOfWorkAdapter adap, IDictionary <string, CommandConfiguration> configs)
 {
     Select = new BatchCommandConfiguration(adap, adap.SelectCommand, configs["select"]);
     Insert = new BatchCommandConfiguration(adap, adap.InsertCommand, configs["insert"]);
     Update = new BatchCommandConfiguration(adap, adap.UpdateCommand, configs["update"]);
     Delete = new BatchCommandConfiguration(adap, adap.DeleteCommand, configs["delete"]);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TransactionalHandler" /> class.
 /// </summary>
 /// <param name="adapter">Used to monitor all transactions.</param>
 /// <param name="storage">Used to temporarily store domain events until the transaction have been committed.</param>
 public TransactionalHandler(IUnitOfWorkAdapter adapter, IDomainEventStorage storage)
 {
     if (adapter == null) throw new ArgumentNullException("adapter");
     if (storage == null) throw new ArgumentNullException("storage");
     _storage = storage;
     adapter.Register(this);
 }
Esempio n. 3
0
        //private void MapSchema(IUnitOfWorkAdapter adap, DataTable dt)
        //{
        //    if (adap.MapTableSchema)
        //        adap.FillSchema(dt, SchemaType.Source);
        //}

        private void MapSchema(IUnitOfWorkAdapter adap, DataSet ds)
        {
            if (adap.MapTableSchema)
            {
                adap.FillSchema(ds, SchemaType.Source);
            }
        }
 /// <summary>
 /// Wait until transactions have been completed before events are dispatched.
 /// </summary>
 /// <param name="adapter">Adapter used to detect when transactions have been committed/rolled back.</param>
 /// <returns>this</returns>
 /// <seealso cref="TransactionalHandler"/>
 public EventPipelineBuilder WaitOnTransactions(IUnitOfWorkAdapter adapter)
 {
     if (adapter == null)
     {
         throw new ArgumentNullException("adapter");
     }
     _unitOfWorkAdapter = adapter;
     return(this);
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransactionalHandler" /> class.
 /// </summary>
 /// <param name="adapter">Used to monitor all transactions.</param>
 /// <param name="storage">Used to temporarily store domain events until the transaction have been committed.</param>
 public TransactionalHandler(IUnitOfWorkAdapter adapter, IDomainEventStorage storage)
 {
     if (adapter == null)
     {
         throw new ArgumentNullException("adapter");
     }
     if (storage == null)
     {
         throw new ArgumentNullException("storage");
     }
     _storage = storage;
     adapter.Register(this);
 }
 /// <summary>
 /// Wait until transactions have been completed before events are dispatched.
 /// </summary>
 /// <param name="adapter">Adapter used to detect when transactions have been committed/rolled back.</param>
 /// <returns>this</returns>
 /// <seealso cref="TransactionalHandler"/>
 public EventPipelineBuilder WaitOnTransactions(IUnitOfWorkAdapter adapter)
 {
     if (adapter == null) throw new ArgumentNullException("adapter");
     _unitOfWorkAdapter = adapter;
     return this;
 }
Esempio n. 7
0
 public PropertyImageBll(IUnitOfWork unitOfWorkSqlServer)
 {
     this.unitOfWorkSqlServerAdapter = unitOfWorkSqlServer.Create();
 }
Esempio n. 8
0
 /// <summary>
 /// Contructor de la clase
 /// </summary>
 /// <param name="unitOfWorkSqlServer"></param>
 public OwnerBll(IUnitOfWork unitOfWorkSqlServer)
 {
     this.unitOfWorkSqlServerAdapter = unitOfWorkSqlServer.Create();
 }
Esempio n. 9
0
 internal ExecuteNonQueryResult(IUnitOfWorkAdapter adap) : base(adap)
 {
     Start();
 }
Esempio n. 10
0
 internal ExecuteScalarResult(IUnitOfWorkAdapter adap) : base(adap)
 {
     Start();
 }
Esempio n. 11
0
 public ExecuteFillDataSetResult(DataSet ds, IUnitOfWorkAdapter adap, string srcTable = null) : base(adap)
 {
     Result      = ds;
     SourceTable = srcTable;
     Start();
 }
Esempio n. 12
0
 public ExecuteFillDataTableResult(DataTable dt, IUnitOfWorkAdapter adap) : base(adap)
 {
     _adap  = adap;
     Result = dt;
     Start();
 }
Esempio n. 13
0
 internal ExecuteResult(IUnitOfWorkAdapter adap)
 {
     Adapter = adap;
 }
Esempio n. 14
0
 internal BatchCommandConfiguration(IUnitOfWorkAdapter adap, DbCommand command, CommandConfiguration config)
 {
     _adap    = adap;
     _command = command;
     _config  = config;
 }