Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2017-03-15 19:21:26 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2017-03-16 15:02:09 +0300
commita82fcb2c9c23195719495b9c335b4cb05aef649e (patch)
tree84190ae10631b026d46cd137aecca4d04661362a /mcs/class/System.Transactions
parent1b5338dc5f32d1fc0491ddbe3b200f1eba112cff (diff)
[System.Transactions] Rename method parameters to match .NET contract
Diffstat (limited to 'mcs/class/System.Transactions')
-rw-r--r--mcs/class/System.Transactions/System.Transactions/CommittableTransaction.cs16
-rw-r--r--mcs/class/System.Transactions/System.Transactions/IDtcTransaction.cs6
-rw-r--r--mcs/class/System.Transactions/System.Transactions/IPromotableSinglePhaseNotification.cs4
-rw-r--r--mcs/class/System.Transactions/System.Transactions/ISinglePhaseNotification.cs2
-rw-r--r--mcs/class/System.Transactions/System.Transactions/PreparingEnlistment.cs4
-rw-r--r--mcs/class/System.Transactions/System.Transactions/SubordinateTransaction.cs2
-rw-r--r--mcs/class/System.Transactions/System.Transactions/Transaction.cs40
-rw-r--r--mcs/class/System.Transactions/System.Transactions/TransactionInterop.cs8
-rw-r--r--mcs/class/System.Transactions/System.Transactions/TransactionManager.cs8
-rw-r--r--mcs/class/System.Transactions/System.Transactions/TransactionOptions.cs16
-rw-r--r--mcs/class/System.Transactions/System.Transactions/TransactionScope.cs56
-rw-r--r--mcs/class/System.Transactions/Test/TransactionScopeTest.cs4
12 files changed, 83 insertions, 83 deletions
diff --git a/mcs/class/System.Transactions/System.Transactions/CommittableTransaction.cs b/mcs/class/System.Transactions/System.Transactions/CommittableTransaction.cs
index f6781dc923f..f98f6fa6e12 100644
--- a/mcs/class/System.Transactions/System.Transactions/CommittableTransaction.cs
+++ b/mcs/class/System.Transactions/System.Transactions/CommittableTransaction.cs
@@ -41,26 +41,26 @@ namespace System.Transactions
this.options = options;
}
- public IAsyncResult BeginCommit (AsyncCallback callback,
- object user_defined_state)
+ public IAsyncResult BeginCommit (AsyncCallback asyncCallback,
+ object asyncState)
{
- this.callback = callback;
- this.user_defined_state = user_defined_state;
+ this.callback = asyncCallback;
+ this.user_defined_state = asyncState;
AsyncCallback cb = null;
- if (callback != null)
+ if (asyncCallback != null)
cb = new AsyncCallback (CommitCallback);
asyncResult = BeginCommitInternal (cb);
return this;
}
- public void EndCommit (IAsyncResult ar)
+ public void EndCommit (IAsyncResult asyncResult)
{
- if (ar != this)
+ if (asyncResult != this)
throw new ArgumentException ("The IAsyncResult parameter must be the same parameter as returned by BeginCommit.", "asyncResult");
- EndCommitInternal (asyncResult);
+ EndCommitInternal (this.asyncResult);
}
private void CommitCallback (IAsyncResult ar)
diff --git a/mcs/class/System.Transactions/System.Transactions/IDtcTransaction.cs b/mcs/class/System.Transactions/System.Transactions/IDtcTransaction.cs
index 65d012779cf..29a2ee72120 100644
--- a/mcs/class/System.Transactions/System.Transactions/IDtcTransaction.cs
+++ b/mcs/class/System.Transactions/System.Transactions/IDtcTransaction.cs
@@ -19,11 +19,11 @@ namespace System.Transactions
[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
public interface IDtcTransaction
{
- void Abort (IntPtr manager, int whatever, int whatever2);
+ void Abort (IntPtr reason, int retaining, int async);
- void Commit (int whatever, int whatever2, int whatever3);
+ void Commit (int retaining, int commitType, int reserved);
- void GetTransactionInfo (IntPtr whatever);
+ void GetTransactionInfo (IntPtr transactionInformation);
}
}
diff --git a/mcs/class/System.Transactions/System.Transactions/IPromotableSinglePhaseNotification.cs b/mcs/class/System.Transactions/System.Transactions/IPromotableSinglePhaseNotification.cs
index 4e01d02de61..9684e74298c 100644
--- a/mcs/class/System.Transactions/System.Transactions/IPromotableSinglePhaseNotification.cs
+++ b/mcs/class/System.Transactions/System.Transactions/IPromotableSinglePhaseNotification.cs
@@ -14,9 +14,9 @@ namespace System.Transactions
{
void Initialize ();
- void Rollback (SinglePhaseEnlistment enlistment);
+ void Rollback (SinglePhaseEnlistment singlePhaseEnlistment);
- void SinglePhaseCommit (SinglePhaseEnlistment enlistment);
+ void SinglePhaseCommit (SinglePhaseEnlistment singlePhaseEnlistment);
}
}
diff --git a/mcs/class/System.Transactions/System.Transactions/ISinglePhaseNotification.cs b/mcs/class/System.Transactions/System.Transactions/ISinglePhaseNotification.cs
index e206193a4c3..7d029fa0c79 100644
--- a/mcs/class/System.Transactions/System.Transactions/ISinglePhaseNotification.cs
+++ b/mcs/class/System.Transactions/System.Transactions/ISinglePhaseNotification.cs
@@ -13,7 +13,7 @@ namespace System.Transactions
public interface ISinglePhaseNotification
: IEnlistmentNotification
{
- void SinglePhaseCommit (SinglePhaseEnlistment enlistment);
+ void SinglePhaseCommit (SinglePhaseEnlistment singlePhaseEnlistment);
}
}
diff --git a/mcs/class/System.Transactions/System.Transactions/PreparingEnlistment.cs b/mcs/class/System.Transactions/System.Transactions/PreparingEnlistment.cs
index 766d637bbed..e662279f85b 100644
--- a/mcs/class/System.Transactions/System.Transactions/PreparingEnlistment.cs
+++ b/mcs/class/System.Transactions/System.Transactions/PreparingEnlistment.cs
@@ -40,9 +40,9 @@ namespace System.Transactions
}
[MonoTODO]
- public void ForceRollback (Exception ex)
+ public void ForceRollback (Exception e)
{
- tx.Rollback (ex, enlisted);
+ tx.Rollback (e, enlisted);
/* See test RMFail2 */
((ManualResetEvent) waitHandle).Set ();
}
diff --git a/mcs/class/System.Transactions/System.Transactions/SubordinateTransaction.cs b/mcs/class/System.Transactions/System.Transactions/SubordinateTransaction.cs
index 198ab796d55..efb1c4007a3 100644
--- a/mcs/class/System.Transactions/System.Transactions/SubordinateTransaction.cs
+++ b/mcs/class/System.Transactions/System.Transactions/SubordinateTransaction.cs
@@ -14,7 +14,7 @@ namespace System.Transactions
[Serializable]
public sealed class SubordinateTransaction : Transaction
{
- public SubordinateTransaction (IsolationLevel level,
+ public SubordinateTransaction (IsolationLevel isoLevel,
ISimpleTransactionSuperior superior)
{
throw new NotImplementedException ();
diff --git a/mcs/class/System.Transactions/System.Transactions/Transaction.cs b/mcs/class/System.Transactions/System.Transactions/Transaction.cs
index 20c31072d9b..33422d15f1e 100644
--- a/mcs/class/System.Transactions/System.Transactions/Transaction.cs
+++ b/mcs/class/System.Transactions/System.Transactions/Transaction.cs
@@ -137,44 +137,44 @@ namespace System.Transactions
[MonoTODO]
public DependentTransaction DependentClone (
- DependentCloneOption option)
+ DependentCloneOption cloneOption)
{
DependentTransaction d =
- new DependentTransaction (this, option);
+ new DependentTransaction (this, cloneOption);
dependents.Add (d);
return d;
}
[MonoTODO ("Only SinglePhase commit supported for durable resource managers.")]
[PermissionSetAttribute (SecurityAction.LinkDemand)]
- public Enlistment EnlistDurable (Guid manager,
- IEnlistmentNotification notification,
- EnlistmentOptions options)
+ public Enlistment EnlistDurable (Guid resourceManagerIdentifier,
+ IEnlistmentNotification enlistmentNotification,
+ EnlistmentOptions enlistmentOptions)
{
throw new NotImplementedException ("DTC unsupported, only SinglePhase commit supported for durable resource managers.");
}
[MonoTODO ("Only Local Transaction Manager supported. Cannot have more than 1 durable resource per transaction. Only EnlistmentOptions.None supported yet.")]
[PermissionSetAttribute (SecurityAction.LinkDemand)]
- public Enlistment EnlistDurable (Guid manager,
- ISinglePhaseNotification notification,
- EnlistmentOptions options)
+ public Enlistment EnlistDurable (Guid resourceManagerIdentifier,
+ ISinglePhaseNotification singlePhaseNotification,
+ EnlistmentOptions enlistmentOptions)
{
EnsureIncompleteCurrentScope ();
if (pspe != null || Durables.Count > 0)
throw new NotImplementedException ("DTC unsupported, multiple durable resource managers aren't supported.");
- if (options != EnlistmentOptions.None)
+ if (enlistmentOptions != EnlistmentOptions.None)
throw new NotImplementedException ("EnlistmentOptions other than None aren't supported");
- Durables.Add (notification);
+ Durables.Add (singlePhaseNotification);
/* FIXME: Enlistment ?? */
return new Enlistment ();
}
public bool EnlistPromotableSinglePhase (
- IPromotableSinglePhaseNotification notification)
+ IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
{
EnsureIncompleteCurrentScope ();
@@ -183,7 +183,7 @@ namespace System.Transactions
if (pspe != null || Durables.Count > 0)
return false;
- pspe = notification;
+ pspe = promotableSinglePhaseNotification;
pspe.Initialize();
return true;
@@ -211,19 +211,19 @@ namespace System.Transactions
[MonoTODO ("EnlistmentOptions being ignored")]
public Enlistment EnlistVolatile (
- IEnlistmentNotification notification,
- EnlistmentOptions options)
+ IEnlistmentNotification enlistmentNotification,
+ EnlistmentOptions enlistmentOptions)
{
- return EnlistVolatileInternal (notification, options);
+ return EnlistVolatileInternal (enlistmentNotification, enlistmentOptions);
}
[MonoTODO ("EnlistmentOptions being ignored")]
public Enlistment EnlistVolatile (
- ISinglePhaseNotification notification,
- EnlistmentOptions options)
+ ISinglePhaseNotification singlePhaseNotification,
+ EnlistmentOptions enlistmentOptions)
{
/* FIXME: Anything extra reqd for this? */
- return EnlistVolatileInternal (notification, options);
+ return EnlistVolatileInternal (singlePhaseNotification, enlistmentOptions);
}
private Enlistment EnlistVolatileInternal (
@@ -287,10 +287,10 @@ namespace System.Transactions
Rollback (null);
}
- public void Rollback (Exception ex)
+ public void Rollback (Exception e)
{
EnsureIncompleteCurrentScope ();
- Rollback (ex, null);
+ Rollback (e, null);
}
internal void Rollback (Exception ex, object abortingEnlisted)
diff --git a/mcs/class/System.Transactions/System.Transactions/TransactionInterop.cs b/mcs/class/System.Transactions/System.Transactions/TransactionInterop.cs
index a764cf6e096..2d0cf35bed6 100644
--- a/mcs/class/System.Transactions/System.Transactions/TransactionInterop.cs
+++ b/mcs/class/System.Transactions/System.Transactions/TransactionInterop.cs
@@ -25,27 +25,27 @@ namespace System.Transactions
[MonoTODO]
public static byte [] GetExportCookie (Transaction transaction,
- byte [] exportCookie)
+ byte [] whereabouts)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static Transaction GetTransactionFromDtcTransaction (
- IDtcTransaction dtc)
+ IDtcTransaction transactionNative)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static Transaction GetTransactionFromExportCookie (
- byte [] exportCookie)
+ byte [] cookie)
{
throw new NotImplementedException ();
}
[MonoTODO]
- public static Transaction GetTransactionFromTransmitterPropagationToken (byte [] token)
+ public static Transaction GetTransactionFromTransmitterPropagationToken (byte [] propagationToken)
{
throw new NotImplementedException ();
}
diff --git a/mcs/class/System.Transactions/System.Transactions/TransactionManager.cs b/mcs/class/System.Transactions/System.Transactions/TransactionManager.cs
index b0d90bc2eaa..491f46f765a 100644
--- a/mcs/class/System.Transactions/System.Transactions/TransactionManager.cs
+++ b/mcs/class/System.Transactions/System.Transactions/TransactionManager.cs
@@ -67,15 +67,15 @@ namespace System.Transactions
}
[MonoTODO ("Not implemented")]
- public static void RecoveryComplete (Guid manager)
+ public static void RecoveryComplete (Guid resourceManagerIdentifier)
{
throw new NotImplementedException ();
}
[MonoTODO ("Not implemented")]
- public static Enlistment Reenlist (Guid manager,
- byte[] recoveryInfo,
- IEnlistmentNotification notification)
+ public static Enlistment Reenlist (Guid resourceManagerIdentifier,
+ byte[] recoveryInformation,
+ IEnlistmentNotification enlistmentNotification)
{
throw new NotImplementedException ();
}
diff --git a/mcs/class/System.Transactions/System.Transactions/TransactionOptions.cs b/mcs/class/System.Transactions/System.Transactions/TransactionOptions.cs
index a466cfb74ca..03fbab0966a 100644
--- a/mcs/class/System.Transactions/System.Transactions/TransactionOptions.cs
+++ b/mcs/class/System.Transactions/System.Transactions/TransactionOptions.cs
@@ -32,18 +32,18 @@ namespace System.Transactions
set { timeout = value; }
}
- public static bool operator == (TransactionOptions o1,
- TransactionOptions o2)
+ public static bool operator == (TransactionOptions x,
+ TransactionOptions y)
{
- return o1.level == o2.level &&
- o1.timeout == o2.timeout;
+ return x.level == y.level &&
+ x.timeout == y.timeout;
}
- public static bool operator != (TransactionOptions o1,
- TransactionOptions o2)
+ public static bool operator != (TransactionOptions x,
+ TransactionOptions y)
{
- return o1.level != o2.level ||
- o1.timeout != o2.timeout;
+ return x.level != y.level ||
+ x.timeout != y.timeout;
}
public override bool Equals (object obj)
diff --git a/mcs/class/System.Transactions/System.Transactions/TransactionScope.cs b/mcs/class/System.Transactions/System.Transactions/TransactionScope.cs
index ac57713b59d..874ddde0d88 100644
--- a/mcs/class/System.Transactions/System.Transactions/TransactionScope.cs
+++ b/mcs/class/System.Transactions/System.Transactions/TransactionScope.cs
@@ -39,39 +39,39 @@ namespace System.Transactions
{
}
- public TransactionScope(TransactionScopeAsyncFlowOption asyncFlow)
+ public TransactionScope(TransactionScopeAsyncFlowOption asyncFlowOption)
: this(TransactionScopeOption.Required,
- TransactionManager.DefaultTimeout, asyncFlow)
+ TransactionManager.DefaultTimeout, asyncFlowOption)
{
}
- public TransactionScope (Transaction transaction)
- : this (transaction, TransactionManager.DefaultTimeout)
+ public TransactionScope (Transaction transactionToUse)
+ : this (transactionToUse, TransactionManager.DefaultTimeout)
{
}
- public TransactionScope (Transaction transaction,
- TimeSpan timeout)
- : this (transaction, timeout, DTCOption.None)
+ public TransactionScope (Transaction transactionToUse,
+ TimeSpan scopeTimeout)
+ : this (transactionToUse, scopeTimeout, DTCOption.None)
{
}
[MonoTODO ("EnterpriseServicesInteropOption not supported.")]
- public TransactionScope (Transaction transaction,
- TimeSpan timeout, DTCOption opt)
+ public TransactionScope (Transaction transactionToUse,
+ TimeSpan scopeTimeout, DTCOption interopOption)
{
Initialize (TransactionScopeOption.Required,
- transaction, defaultOptions, opt, timeout, TransactionScopeAsyncFlowOption.Suppress);
+ transactionToUse, defaultOptions, interopOption, scopeTimeout, TransactionScopeAsyncFlowOption.Suppress);
}
- public TransactionScope (TransactionScopeOption option)
- : this (option, TransactionManager.DefaultTimeout)
+ public TransactionScope (TransactionScopeOption scopeOption)
+ : this (scopeOption, TransactionManager.DefaultTimeout)
{
}
- public TransactionScope (TransactionScopeOption option,
- TimeSpan timeout)
- : this (option, timeout, TransactionScopeAsyncFlowOption.Suppress)
+ public TransactionScope (TransactionScopeOption scopeOption,
+ TimeSpan scopeTimeout)
+ : this (scopeOption, scopeTimeout, TransactionScopeAsyncFlowOption.Suppress)
{
}
@@ -80,25 +80,25 @@ namespace System.Transactions
{
}
- public TransactionScope (TransactionScopeOption option,
- TimeSpan timeout, TransactionScopeAsyncFlowOption asyncFlow)
+ public TransactionScope (TransactionScopeOption scopeOption,
+ TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlow)
{
- Initialize (option, null, defaultOptions,
- DTCOption.None, timeout, asyncFlow);
+ Initialize (scopeOption, null, defaultOptions,
+ DTCOption.None, scopeTimeout, asyncFlow);
}
public TransactionScope (TransactionScopeOption scopeOption,
- TransactionOptions options)
- : this (scopeOption, options, DTCOption.None)
+ TransactionOptions transactionOptions)
+ : this (scopeOption, transactionOptions, DTCOption.None)
{
}
[MonoTODO ("EnterpriseServicesInteropOption not supported")]
public TransactionScope (TransactionScopeOption scopeOption,
- TransactionOptions options,
- DTCOption opt)
+ TransactionOptions transactionOptions,
+ DTCOption interopOption)
{
- Initialize (scopeOption, null, options, opt,
+ Initialize (scopeOption, null, transactionOptions, interopOption,
TransactionManager.DefaultTimeout, TransactionScopeAsyncFlowOption.Suppress);
}
@@ -124,17 +124,17 @@ namespace System.Transactions
void Initialize (TransactionScopeOption scopeOption,
Transaction tx, TransactionOptions options,
- DTCOption interop, TimeSpan timeout, TransactionScopeAsyncFlowOption asyncFlow)
+ DTCOption interop, TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlow)
{
completed = false;
isRoot = false;
nested = 0;
asyncFlowEnabled = asyncFlow == TransactionScopeAsyncFlowOption.Enabled;
- if (timeout < TimeSpan.Zero)
- throw new ArgumentOutOfRangeException ("timeout");
+ if (scopeTimeout < TimeSpan.Zero)
+ throw new ArgumentOutOfRangeException ("scopeTimeout");
- this.timeout = timeout;
+ this.timeout = scopeTimeout;
oldTransaction = Transaction.CurrentInternal;
diff --git a/mcs/class/System.Transactions/Test/TransactionScopeTest.cs b/mcs/class/System.Transactions/Test/TransactionScopeTest.cs
index 1dbda6e1d22..a474c995e63 100644
--- a/mcs/class/System.Transactions/Test/TransactionScopeTest.cs
+++ b/mcs/class/System.Transactions/Test/TransactionScopeTest.cs
@@ -25,14 +25,14 @@ namespace MonoTests.System.Transactions
TransactionScope scope = new TransactionScope (TransactionScopeOption.Required, TimeSpan.FromSeconds (-1));
Assert.Fail ("Expected exception when passing TransactionScopeOption and an invalid TimeSpan.");
} catch (ArgumentOutOfRangeException ex) {
- Assert.AreEqual (ex.ParamName, "timeout");
+ Assert.AreEqual ("scopeTimeout", ex.ParamName);
}
try {
TransactionScope scope = new TransactionScope (null, TimeSpan.FromSeconds (-1));
Assert.Fail ("Expected exception when passing TransactionScopeOption and an invalid TimeSpan.");
} catch (ArgumentOutOfRangeException ex) {
- Assert.AreEqual (ex.ParamName, "timeout");
+ Assert.AreEqual ("scopeTimeout", ex.ParamName);
}
}