Ejemplo n.º 1
0
        private BulkCopy GetBulkCopy()
        {
            BulkCopy bc = new BulkCopy(this._client);

            bc.DestinationTableName = TableName;
            return(bc);
        }
Ejemplo n.º 2
0
        void bc_SqlRowsCopied(object sender, SqlRowsCopiedEventArgs e)
        {
            RowsCopiedEventArgs re = new RowsCopiedEventArgs(e.RowsCopied);

            re.Abort = e.Abort;
            BulkCopy bc = sender as BulkCopy;

            bc.RowsCopied?.BeginInvoke(sender, re, null, null);
        }
Ejemplo n.º 3
0
        protected void bc_RowsCopied <T>(object sender, T eventArgs) where T : System.EventArgs
        {
            _completedCount++;
            if (_completedCount % NotifyAfter != 0)
            {
                return;
            }
            var RowsCopied         = (long)eventArgs.GetType().GetProperty("RowsCopied").GetValue(eventArgs, null);
            RowsCopiedEventArgs re = new RowsCopiedEventArgs(RowsCopied);
            var Abort = (bool)eventArgs.GetType().GetProperty("Abort").GetValue(eventArgs, null);

            re.Abort = Abort;
            BulkCopy bc = sender as BulkCopy;

            bc.RowsCopied?.BeginInvoke(sender, re, null, null);
        }