예제 #1
0
        private BulkCopy GetBulkCopy()
        {
            BulkCopy bc = new BulkCopy(this._client);

            bc.DestinationTableName = TableName;
            return(bc);
        }
예제 #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);
        }
예제 #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);
        }