Skip to content

Commit 842afde

Browse files
committed
Rename parameters to match interface declarations.
1 parent e6a6729 commit 842afde

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

src/MySqlConnector/Core/EnlistedTransactionBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public void Start()
2020
Transaction!.EnlistVolatile(this, EnlistmentOptions.None);
2121
}
2222

23-
void IEnlistmentNotification.Prepare(PreparingEnlistment enlistment)
23+
void IEnlistmentNotification.Prepare(PreparingEnlistment preparingEnlistment)
2424
{
25-
OnPrepare(enlistment);
26-
enlistment.Prepared();
25+
OnPrepare(preparingEnlistment);
26+
preparingEnlistment.Prepared();
2727
}
2828

2929
void IEnlistmentNotification.Commit(Enlistment enlistment)

src/MySqlConnector/MySqlBatch.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ public void Dispose()
162162
int ICancellableCommand.CommandTimeout => Timeout;
163163
int ICancellableCommand.CancelAttemptCount { get; set; }
164164

165-
IDisposable? ICancellableCommand.RegisterCancel(CancellationToken token)
165+
IDisposable? ICancellableCommand.RegisterCancel(CancellationToken cancellationToken)
166166
{
167-
if (!token.CanBeCanceled)
167+
if (!cancellationToken.CanBeCanceled)
168168
return null;
169169

170170
m_cancelAction ??= Cancel;
171-
return token.Register(m_cancelAction);
171+
return cancellationToken.Register(m_cancelAction);
172172
}
173173

174174
void ICancellableCommand.SetTimeout(int milliseconds)

src/MySqlConnector/MySqlCommand.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public override CommandType CommandType
233233
/// </remarks>
234234
public long LastInsertedId { get; private set; }
235235

236-
void IMySqlCommand.SetLastInsertedId(long value) => LastInsertedId = value;
236+
void IMySqlCommand.SetLastInsertedId(long lastInsertedId) => LastInsertedId = lastInsertedId;
237237

238238
protected override DbConnection? DbConnection
239239
{
@@ -346,19 +346,19 @@ public override ValueTask DisposeAsync()
346346
}
347347

348348
/// <summary>
349-
/// Registers <see cref="Cancel"/> as a callback with <paramref name="token"/> if cancellation is supported.
349+
/// Registers <see cref="Cancel"/> as a callback with <paramref name="cancellationToken"/> if cancellation is supported.
350350
/// </summary>
351-
/// <param name="token">The <see cref="CancellationToken"/>.</param>
351+
/// <param name="cancellationToken">The <see cref="CancellationToken"/>.</param>
352352
/// <returns>An object that must be disposed to revoke the cancellation registration.</returns>
353353
/// <remarks>This method is more efficient than calling <code>token.Register(Command.Cancel)</code> because it avoids
354354
/// unnecessary allocations.</remarks>
355-
IDisposable? ICancellableCommand.RegisterCancel(CancellationToken token)
355+
IDisposable? ICancellableCommand.RegisterCancel(CancellationToken cancellationToken)
356356
{
357-
if (!token.CanBeCanceled)
357+
if (!cancellationToken.CanBeCanceled)
358358
return null;
359359

360360
m_cancelAction ??= Cancel;
361-
return token.Register(m_cancelAction);
361+
return cancellationToken.Register(m_cancelAction);
362362
}
363363

364364
void ICancellableCommand.SetTimeout(int milliseconds)

src/MySqlConnector/MySqlConnection.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,9 @@ private static async Task ClearPoolAsync(MySqlConnection connection, IOBehavior
541541
/// Returns schema information for the data source of this <see cref="MySqlConnection"/>.
542542
/// </summary>
543543
/// <param name="collectionName">The name of the schema to return.</param>
544-
/// <param name="restrictions">The restrictions to apply to the schema; this parameter is currently ignored.</param>
544+
/// <param name="restrictionValues">The restrictions to apply to the schema; this parameter is currently ignored.</param>
545545
/// <returns>A <see cref="DataTable"/> containing schema information.</returns>
546-
public override DataTable GetSchema(string collectionName, string?[] restrictions) => GetSchemaProvider().GetSchemaAsync(IOBehavior.Synchronous, collectionName, default).GetAwaiter().GetResult();
546+
public override DataTable GetSchema(string collectionName, string?[] restrictionValues) => GetSchemaProvider().GetSchemaAsync(IOBehavior.Synchronous, collectionName, default).GetAwaiter().GetResult();
547547

548548
/// <summary>
549549
/// Asynchronously returns schema information for the data source of this <see cref="MySqlConnection"/>.
@@ -576,14 +576,14 @@ public override Task<DataTable> GetSchemaAsync(string collectionName, Cancellati
576576
/// Asynchronously returns schema information for the data source of this <see cref="MySqlConnection"/>.
577577
/// </summary>
578578
/// <param name="collectionName">The name of the schema to return.</param>
579-
/// <param name="restrictions">The restrictions to apply to the schema; this parameter is currently ignored.</param>
579+
/// <param name="restrictionValues">The restrictions to apply to the schema; this parameter is currently ignored.</param>
580580
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
581581
/// <returns>A <see cref="Task{DataTable}"/> containing schema information.</returns>
582582
/// <remarks>The proposed ADO.NET API that this is based on is not finalized; this API may change in the future.</remarks>
583583
#if NET45 || NET461 || NET471 || NETSTANDARD1_3 || NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP2_1 || NETCOREAPP3_1
584-
public Task<DataTable> GetSchemaAsync(string collectionName, string?[] restrictions, CancellationToken cancellationToken = default)
584+
public Task<DataTable> GetSchemaAsync(string collectionName, string?[] restrictionValues, CancellationToken cancellationToken = default)
585585
#else
586-
public override Task<DataTable> GetSchemaAsync(string collectionName, string?[] restrictions, CancellationToken cancellationToken = default)
586+
public override Task<DataTable> GetSchemaAsync(string collectionName, string?[] restrictionValues, CancellationToken cancellationToken = default)
587587
#endif
588588
=> GetSchemaProvider().GetSchemaAsync(AsyncIOBehavior, collectionName, cancellationToken).AsTask();
589589

src/MySqlConnector/MySqlConnectionStringBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,15 @@ public bool UseXaTransactions
371371
}
372372

373373
// Other Methods
374-
public override bool ContainsKey(string key)
374+
public override bool ContainsKey(string keyword)
375375
{
376-
var option = MySqlConnectionStringOption.TryGetOptionForKey(key);
376+
var option = MySqlConnectionStringOption.TryGetOptionForKey(keyword);
377377
return option is object && base.ContainsKey(option.Key);
378378
}
379379

380-
public override bool Remove(string key)
380+
public override bool Remove(string keyword)
381381
{
382-
var option = MySqlConnectionStringOption.TryGetOptionForKey(key);
382+
var option = MySqlConnectionStringOption.TryGetOptionForKey(keyword);
383383
return option is object && base.Remove(option.Key);
384384
}
385385

0 commit comments

Comments
 (0)