@@ -21,7 +21,6 @@ public class NonMsdtcPromoterTests : IDisposable
2121 private static MethodInfo s_setDistributedTransactionIdentifierMethodInfo ;
2222 private static MethodInfo s_getPromotedTokenMethodInfo ;
2323 private static PropertyInfo s_promoterTypePropertyInfo ;
24- private static FieldInfo s_promoterTypeDtcFieldInfo ;
2524
2625 public NonMsdtcPromoterTests ( )
2726 {
@@ -51,17 +50,12 @@ private static void VerifySoftDependencies()
5150
5251 // And the PropertyInfo objects for PromoterType
5352 s_promoterTypePropertyInfo = typeof ( Transaction ) . GetTypeInfo ( ) . GetProperty ( "PromoterType" , typeof ( Guid ) ) ;
54-
55- // And the FieldInfo for TransactionInterop.PromoterTypeDtc
56- s_promoterTypeDtcFieldInfo = typeof ( TransactionInterop ) . GetTypeInfo ( ) . GetField ( "PromoterTypeDtc" , BindingFlags . Public | BindingFlags . Static ) ;
5753 }
5854
5955 bool allMethodsAreThere = ( ( s_enlistPromotableSinglePhaseMethodInfo != null ) &&
6056 ( s_setDistributedTransactionIdentifierMethodInfo != null ) &&
6157 ( s_getPromotedTokenMethodInfo != null ) &&
62- ( s_promoterTypePropertyInfo != null ) &&
63- ( s_promoterTypeDtcFieldInfo != null )
64- ) ;
58+ ( s_promoterTypePropertyInfo != null ) ) ;
6559 Assert . True ( allMethodsAreThere , "At least one of the expected new methods or properties is not implemented by the available System.Transactions." ) ;
6660 }
6761
@@ -339,14 +333,6 @@ private static byte[] TxPromotedToken(Transaction txToGet)
339333 return ( byte [ ] ) s_getPromotedTokenMethodInfo . Invoke ( txToGet , null ) ;
340334 }
341335
342- private static Guid PromoterTypeDtc
343- {
344- get
345- {
346- return ( Guid ) s_promoterTypeDtcFieldInfo . GetValue ( null ) ;
347- }
348- }
349-
350336 #endregion
351337
352338 #region NonMSDTCPromoterEnlistment
@@ -1706,45 +1692,6 @@ private static void TestCase_PromoterType()
17061692 TestPassed ( ) ;
17071693 }
17081694
1709- private static void TestCase_PromoterTypeMSDTC ( )
1710- {
1711- string testCaseDescription = "TestCase_PromoterTypeMSDTC" ;
1712-
1713- Trace ( "**** " + testCaseDescription + " ****" ) ;
1714-
1715- AutoResetEvent volCompleted = new AutoResetEvent ( false ) ;
1716- MyEnlistment vol = null ;
1717-
1718- try
1719- {
1720- using ( TransactionScope ts = new TransactionScope ( ) )
1721- {
1722- Assert . Equal ( Guid . Empty , TxPromoterType ( Transaction . Current ) ) ;
1723-
1724- vol = CreateVolatileEnlistment ( volCompleted ) ;
1725-
1726- // Force MSDTC promotion.
1727- TransactionInterop . GetDtcTransaction ( Transaction . Current ) ;
1728-
1729- // TransactionInterop.PromoterTypeDtc
1730- Assert . Equal ( PromoterTypeDtc , TxPromoterType ( Transaction . Current ) ) ;
1731-
1732- ts . Complete ( ) ;
1733- }
1734- }
1735- catch ( Exception ex )
1736- {
1737- Trace ( string . Format ( "Caught unexpected exception {0}:{1}" , ex . GetType ( ) . ToString ( ) , ex . ToString ( ) ) ) ;
1738- return ;
1739- }
1740-
1741- Assert . True ( volCompleted . WaitOne ( TimeSpan . FromSeconds ( 5 ) ) ) ;
1742-
1743- Assert . True ( vol . CommittedOutcome ) ;
1744-
1745- TestPassed ( ) ;
1746- }
1747-
17481695 private static void TestCase_FailPromotableSinglePhaseNotificationCalls ( )
17491696 {
17501697 string testCaseDescription = "TestCase_FailPromotableSinglePhaseNotificationCalls" ;
@@ -2133,16 +2080,6 @@ public void PSPENonMsdtcGetPromoterType()
21332080 TestCase_PromoterType ( ) ;
21342081 }
21352082
2136- /// <summary>
2137- /// PSPE Non-MSDTC Get PromoterType.
2138- /// </summary>
2139- [ Fact ]
2140- public void PSPENonMsdtcGetPromoterTypeMSDTC ( )
2141- {
2142- // get_PromoterType
2143- TestCase_PromoterTypeMSDTC ( ) ;
2144- }
2145-
21462083 /// <summary>
21472084 /// PSPE Non-MSDTC Fail PromotableSinglePhaseNotification Calls.
21482085 /// </summary>
0 commit comments