Skip to content

Commit c45f2c1

Browse files
committed
Rename RowsCopied event to MySqlRowsCopied.
This will make it possible to add a RowsCopied property.
1 parent 1298b9b commit c45f2c1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/MySqlConnector/MySql.Data.MySqlClient/MySqlBulkCopy.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public MySqlBulkCopy(MySqlConnection connection, MySqlTransaction? transaction =
4444
/// <remarks>
4545
/// Receipt of a RowsCopied event does not imply that any rows have been sent to the server or committed.
4646
/// </remarks>
47-
public event MySqlRowsCopiedEventHandler? RowsCopied;
47+
public event MySqlRowsCopiedEventHandler? MySqlRowsCopied;
4848

4949
/// <summary>
5050
/// A collection of <see cref="MySqlBulkCopyColumnMapping"/> objects. If the columns being copied from the
@@ -220,7 +220,7 @@ internal async Task SendDataReaderAsync(IOBehavior ioBehavior, CancellationToken
220220
// allocate a reusable MySqlRowsCopiedEventArgs if event notification is necessary
221221
var rowsCopied = 0;
222222
MySqlRowsCopiedEventArgs? eventArgs = null;
223-
if (NotifyAfter > 0 && RowsCopied is object)
223+
if (NotifyAfter > 0 && MySqlRowsCopied is object)
224224
eventArgs = new MySqlRowsCopiedEventArgs();
225225

226226
try
@@ -271,7 +271,7 @@ await m_valuesEnumerator.MoveNextAsync().ConfigureAwait(false) :
271271
if (eventArgs is object && rowsCopied % NotifyAfter == 0)
272272
{
273273
eventArgs.RowsCopied = rowsCopied;
274-
RowsCopied!(this, eventArgs);
274+
MySqlRowsCopied!(this, eventArgs);
275275
if (eventArgs.Abort)
276276
break;
277277
}
@@ -288,7 +288,7 @@ await m_valuesEnumerator.MoveNextAsync().ConfigureAwait(false) :
288288
if (eventArgs is object && rowsCopied % NotifyAfter != 0)
289289
{
290290
eventArgs.RowsCopied = rowsCopied;
291-
RowsCopied!(this, eventArgs);
291+
MySqlRowsCopied!(this, eventArgs);
292292
}
293293
}
294294
finally

src/MySqlConnector/MySql.Data.MySqlClient/MySqlRowsCopiedEventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal MySqlRowsCopiedEventArgs()
2020
}
2121

2222
/// <summary>
23-
/// Represents the method that handles the <see cref="MySqlBulkCopy.RowsCopied"/> event of a <see cref="MySqlBulkCopy"/>.
23+
/// Represents the method that handles the <see cref="MySqlBulkCopy.MySqlRowsCopied"/> event of a <see cref="MySqlBulkCopy"/>.
2424
/// </summary>
2525
public delegate void MySqlRowsCopiedEventHandler(object sender, MySqlRowsCopiedEventArgs e);
2626
}

tests/SideBySide/BulkLoaderAsync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public async Task BulkCopyNotifyAfter(int notifyAfter, int rowCount, int expecte
525525
};
526526
int eventCount = 0;
527527
long rowsCopied = 0;
528-
bulkCopy.RowsCopied += (s, e) =>
528+
bulkCopy.MySqlRowsCopied += (s, e) =>
529529
{
530530
eventCount++;
531531
rowsCopied = e.RowsCopied;
@@ -565,7 +565,7 @@ public async Task BulkCopyAbort(int notifyAfter, int rowCount, int abortAfter, i
565565
};
566566
int eventCount = 0;
567567
long rowsCopied = 0;
568-
bulkCopy.RowsCopied += (s, e) =>
568+
bulkCopy.MySqlRowsCopied += (s, e) =>
569569
{
570570
eventCount++;
571571
rowsCopied = e.RowsCopied;

tests/SideBySide/BulkLoaderSync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ public void BulkCopyNotifyAfter(int notifyAfter, int rowCount, int expectedEvent
721721
};
722722
int eventCount = 0;
723723
long rowsCopied = 0;
724-
bulkCopy.RowsCopied += (s, e) =>
724+
bulkCopy.MySqlRowsCopied += (s, e) =>
725725
{
726726
eventCount++;
727727
rowsCopied = e.RowsCopied;
@@ -761,7 +761,7 @@ public void BulkCopyAbort(int notifyAfter, int rowCount, int abortAfter, int exp
761761
};
762762
int eventCount = 0;
763763
long rowsCopied = 0;
764-
bulkCopy.RowsCopied += (s, e) =>
764+
bulkCopy.MySqlRowsCopied += (s, e) =>
765765
{
766766
eventCount++;
767767
rowsCopied = e.RowsCopied;

0 commit comments

Comments
 (0)