Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit d2a27b5

Browse files
committed
Address PR feedback on System.Transactions
And fix project.json versions
1 parent f7125b3 commit d2a27b5

16 files changed

Lines changed: 68 additions & 90 deletions

src/System.Transactions/pkg/System.Transactions.pkgproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
44
<ItemGroup>
55
<ProjectReference Include="..\src\System.Transactions.builds">
6-
<SupportedFramework>net461;netcore50;netcoreapp1.0</SupportedFramework>
6+
<SupportedFramework>net461;netcore50;netcoreapp1.0;$(AllXamarinFrameworks)</SupportedFramework>
77
</ProjectReference>
88

99
<InboxOnTargetFramework Include="net461">

src/System.Transactions/ref/System.Transactions.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public enum EnterpriseServicesInteropOption
5050
None = 0,
5151
}
5252
public delegate System.Transactions.Transaction HostCurrentTransactionCallback();
53-
//[System.Runtime.InteropServices.InterfaceTypeAttribute((System.Runtime.InteropServices.ComInterfaceType)(1))]
53+
//[System.Runtime.InteropServices.InterfaceTypeAttribute((System.Runtime.InteropServices.ComInterfaceType)(1))] // TODO: Put back when available
5454
public partial interface IDtcTransaction
5555
{
5656
void Abort(System.IntPtr reason, int retaining, int async);
@@ -121,14 +121,10 @@ internal Transaction() { }
121121
public System.Guid PromoterType { get; }
122122
public System.Transactions.TransactionInformation TransactionInformation { get { return default(System.Transactions.TransactionInformation); } }
123123
public event System.Transactions.TransactionCompletedEventHandler TransactionCompleted { add { } remove { } }
124-
//protected System.IAsyncResult BeginCommitInternal(System.AsyncCallback callback) { return default(System.IAsyncResult); }
125124
public System.Transactions.Transaction Clone() { return default(System.Transactions.Transaction); }
126125
public System.Transactions.DependentTransaction DependentClone(System.Transactions.DependentCloneOption cloneOption) { return default(System.Transactions.DependentTransaction); }
127126
public void Dispose() { }
128-
//protected void EndCommitInternal(System.IAsyncResult ar) { }
129-
//[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand)]
130127
public System.Transactions.Enlistment EnlistDurable(System.Guid resourceManagerIdentifier, System.Transactions.IEnlistmentNotification enlistmentNotification, System.Transactions.EnlistmentOptions enlistmentOptions) { return default(System.Transactions.Enlistment); }
131-
//[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand)]
132128
public System.Transactions.Enlistment EnlistDurable(System.Guid resourceManagerIdentifier, System.Transactions.ISinglePhaseNotification singlePhaseNotification, System.Transactions.EnlistmentOptions enlistmentOptions) { return default(System.Transactions.Enlistment); }
133129
public bool EnlistPromotableSinglePhase(System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification) { return default(bool); }
134130
public bool EnlistPromotableSinglePhase(System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification, System.Guid promoterType) { return default(bool); }
@@ -158,7 +154,7 @@ public partial class TransactionEventArgs : System.EventArgs
158154
public TransactionEventArgs() { }
159155
public System.Transactions.Transaction Transaction { get { return default(System.Transactions.Transaction); } }
160156
}
161-
public partial class TransactionException : System.Exception //System.SystemException
157+
public partial class TransactionException : System.Exception //System.SystemException // TODO: Put back when available
162158
{
163159
protected TransactionException() { }
164160
protected TransactionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"dependencies": {
3-
"System.Runtime": "4.0.1",
3+
"System.Runtime": "4.0.10",
44
"System.Runtime.Serialization.Primitives": "4.1.1",
5-
"System.Runtime.Serialization.Formatters": "4.0.1-beta-24222-03"
5+
"System.Runtime.Serialization.Formatters": "4.0.1-beta-24318-03"
66
},
77
"frameworks": {
88
"netstandard1.4": {
9-
"imports": [ "dotnet5.4" ]
9+
"imports": [
10+
"dotnet5.4"
11+
]
1012
}
1113
}
12-
}
14+
}

src/System.Transactions/src/System.Transactions.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<Compile Include="System\Transactions\ISinglePhaseNotification.cs" />
2828
<Compile Include="System\Transactions\ITransactionPromoter.cs" />
2929
<Compile Include="System\Transactions\PreparingEnlistment.cs" />
30-
<Compile Include="System\Transactions\SafeIUnknown.cs" />
3130
<Compile Include="System\Transactions\SinglePhaseEnlistment.cs" />
3231
<Compile Include="System\Transactions\SubordinateTransaction.cs" />
3332
<Compile Include="System\Transactions\TemporaryStubs.cs" /> <!-- TODO: Remove this when proper formatter support is available -->

src/System.Transactions/src/System/Transactions/Configuration/AppSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ private static void EnsureSettingsLoaded()
1818
{
1919
if (!s_settingsInitalized)
2020
{
21+
// TODO: Determine how to handle configuration.
2122
// This uses System.Configuration on desktop to load:
2223
// Transactions:IncludeDistributedTransactionIdInExceptionMessage
2324
s_includeDistributedTxIdInExceptionMessage = false;

src/System.Transactions/src/System/Transactions/SafeIUnknown.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/System.Transactions/src/System/Transactions/Transaction.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@ internal Transaction(IsolationLevel isoLevel, InternalTransaction internalTransa
276276
}
277277
}
278278

279-
internal Transaction(DistributedTransaction oleTransaction)
279+
internal Transaction(DistributedTransaction distributedTransaction)
280280
{
281-
_isoLevel = oleTransaction.IsolationLevel;
282-
_internalTransaction = new InternalTransaction(this, oleTransaction);
281+
_isoLevel = distributedTransaction.IsolationLevel;
282+
_internalTransaction = new InternalTransaction(this, distributedTransaction);
283283
_cloneId = Interlocked.Increment(ref _internalTransaction._cloneCount);
284284
}
285285

src/System.Transactions/src/System/Transactions/TransactionInterop.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ internal static DistributedTransaction ConvertToDistributedTransaction(Transacti
3939
throw TransactionException.CreateTransactionCompletedException(SR.TraceSourceLtm, transaction.DistributedTxId);
4040
}
4141

42-
DistributedTransaction oletxTx = transaction.Promote();
43-
if (oletxTx == null)
42+
DistributedTransaction distributedTx = transaction.Promote();
43+
if (distributedTx == null)
4444
{
4545
throw DistributedTransaction.NotSupported();
4646
}
47-
return oletxTx;
47+
return distributedTx;
4848
}
4949

5050
/// <summary>

src/System.Transactions/src/System/Transactions/TransactionManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ internal static Transaction FindOrCreatePromotedTransaction(Guid transactionIden
557557
tx = weakRef.Target as Transaction;
558558
if (null != tx)
559559
{
560-
// If we found a transaction then dispose the oletx
560+
// If we found a transaction then dispose it
561561
dtx.Dispose();
562562
return tx.InternalClone();
563563
}

src/System.Transactions/src/System/Transactions/TransactionScope.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ private void Timeout()
923923
}
924924
catch (TransactionException txEx)
925925
{
926-
// Tolerate transaction exceptions - VSWhidbey 466868.
926+
// Tolerate transaction exceptions
927927
if (DiagnosticTrace.Verbose)
928928
{
929929
ExceptionConsumedTraceRecord.Trace(SR.TraceSourceBase,

0 commit comments

Comments
 (0)