3636using System . Threading . Tasks ;
3737using AsyncRewriter ;
3838using JetBrains . Annotations ;
39- #if NET45 || NET451 || DNX451
39+ #if NET45 || NET451
4040using System . Transactions ;
4141#endif
4242using Npgsql . Logging ;
@@ -100,7 +100,7 @@ public sealed partial class NpgsqlConnection : DbConnection, ICloneable
100100
101101 bool _wasBroken ;
102102
103- #if NET45 || NET451 || DNX451
103+ #if NET45 || NET451
104104 NpgsqlPromotableSinglePhaseNotification Promotable => _promotable ?? ( _promotable = new NpgsqlPromotableSinglePhaseNotification ( this ) ) ;
105105 NpgsqlPromotableSinglePhaseNotification _promotable ;
106106#endif
@@ -153,7 +153,7 @@ void Init()
153153 _noticeDelegate = OnNotice ;
154154 _notificationDelegate = OnNotification ;
155155
156- #if NET45 || NET451 || DNX451
156+ #if NET45 || NET451
157157 // Fix authentication problems. See https://bugzilla.novell.com/show_bug.cgi?id=MONO77559 and
158158 // http://pgfoundry.org/forum/message.php?msg_id=1002377 for more info.
159159 RSACryptoServiceProvider . UseMachineKeyStore = true ;
@@ -166,8 +166,7 @@ void Init()
166166 /// Opens a database connection with the property settings specified by the
167167 /// <see cref="NpgsqlConnection.ConnectionString">ConnectionString</see>.
168168 /// </summary>
169- public override void Open ( )
170- => OpenInternal ( ) ;
169+ public override void Open ( ) => OpenInternal ( ) ;
171170
172171 /// <summary>
173172 /// This is the asynchronous version of <see cref="Open"/>.
@@ -177,8 +176,7 @@ public override void Open()
177176 /// </remarks>
178177 /// <param name="cancellationToken">The cancellation instruction.</param>
179178 /// <returns>A task representing the asynchronous operation.</returns>
180- public override Task OpenAsync ( CancellationToken cancellationToken )
181- => OpenInternalAsync ( cancellationToken ) ;
179+ public override Task OpenAsync ( CancellationToken cancellationToken ) => OpenInternalAsync ( cancellationToken ) ;
182180
183181 [ RewriteAsync ]
184182 void OpenInternal ( )
@@ -235,7 +233,7 @@ void OpenInternal()
235233 Connector . Notice += _noticeDelegate ;
236234 Connector . Notification += _notificationDelegate ;
237235
238- #if NET45 || NET451 || DNX451
236+ #if NET45 || NET451
239237 if ( Settings . Enlist )
240238 {
241239 Promotable . Enlist ( Transaction . Current ) ;
@@ -521,7 +519,7 @@ internal void PromotableLocalTransactionEnded()
521519 ReallyClose ( ) ;
522520 }
523521
524- #if NET45 || NET451 || DNX451
522+ #if NET45 || NET451
525523 /// <summary>
526524 /// Enlist transation.
527525 /// </summary>
@@ -552,7 +550,7 @@ public override void Close()
552550
553551 Log . Trace ( "Closing connection" , Connector . Id ) ;
554552
555- #if NET45 || NET451 || DNX451
553+ #if NET45 || NET451
556554 if ( _promotable != null && _promotable . InLocalTransaction )
557555 {
558556 _postponingClose = true ;
@@ -570,7 +568,7 @@ internal void ReallyClose(bool wasBroken=false)
570568 _postponingClose = false ;
571569 _wasBroken = wasBroken ;
572570
573- #if NET45 || NET451 || DNX451
571+ #if NET45 || NET451
574572 // clear the way for another promotable transaction
575573 _promotable = null ;
576574#endif
@@ -1287,7 +1285,7 @@ internal void CheckReady()
12871285 #endregion State checks
12881286
12891287 #region Schema operations
1290- #if NET45 || NET451 || DNX451
1288+ #if NET45 || NET451
12911289 /// <summary>
12921290 /// Returns the supported collections
12931291 /// </summary>
@@ -1363,7 +1361,7 @@ public override DataTable GetSchema([CanBeNull] string collectionName, [CanBeNul
13631361
13641362 #region Misc
13651363
1366- #if NET45 || NET451 || DNX451
1364+ #if NET45 || NET451
13671365 object ICloneable . Clone ( )
13681366 {
13691367 CheckNotDisposed ( ) ;
@@ -1420,7 +1418,7 @@ public override void ChangeDatabase(String dbName)
14201418 Open ( ) ;
14211419 }
14221420
1423- #if NET45 || NET451 || DNX451
1421+ #if NET45 || NET451
14241422 /// <summary>
14251423 /// DB provider factory.
14261424 /// </summary>
0 commit comments