@@ -55,7 +55,7 @@ public static void ClearPool(string connectionString)
5555
5656 #region Static Database Creation/Drop methods
5757
58- public static void CreateDatabase ( string connectionString , int pageSize = 4096 , bool forcedWrites = true , bool overwrite = false ) => CreateDatabaseImpl ( connectionString , pageSize , forcedWrites , overwrite , new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
58+ public static void CreateDatabase ( string connectionString , int pageSize = 4096 , bool forcedWrites = true , bool overwrite = false ) => CreateDatabaseImpl ( connectionString , pageSize , forcedWrites , overwrite , AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
5959 public static Task CreateDatabaseAsync ( string connectionString , int pageSize = 4096 , bool forcedWrites = true , bool overwrite = false , CancellationToken cancellationToken = default ) => CreateDatabaseImpl ( connectionString , pageSize , forcedWrites , overwrite , new AsyncWrappingCommonArgs ( true , cancellationToken ) ) ;
6060 private static async Task CreateDatabaseImpl ( string connectionString , int pageSize , bool forcedWrites , bool overwrite , AsyncWrappingCommonArgs async )
6161 {
@@ -80,7 +80,7 @@ private static async Task CreateDatabaseImpl(string connectionString, int pageSi
8080 }
8181 }
8282
83- public static void DropDatabase ( string connectionString ) => DropDatabaseImpl ( connectionString , new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
83+ public static void DropDatabase ( string connectionString ) => DropDatabaseImpl ( connectionString , AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
8484 public static Task DropDatabaseAsync ( string connectionString , CancellationToken cancellationToken = default ) => DropDatabaseImpl ( connectionString , new AsyncWrappingCommonArgs ( true , cancellationToken ) ) ;
8585 static async Task DropDatabaseImpl ( string connectionString , AsyncWrappingCommonArgs async )
8686 {
@@ -257,7 +257,7 @@ protected override void Dispose(bool disposing)
257257 {
258258 if ( disposing )
259259 {
260- DisposeHelper ( new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
260+ DisposeHelper ( AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
261261 }
262262 base . Dispose ( disposing ) ;
263263 }
@@ -309,7 +309,7 @@ public Task<FbTransaction> BeginTransactionAsync(IsolationLevel level, Cancellat
309309 => BeginTransactionAsync ( level , null , cancellationToken ) ;
310310 public FbTransaction BeginTransaction ( string transactionName ) => BeginTransaction ( FbTransaction . DefaultIsolationLevel , transactionName ) ;
311311 public Task < FbTransaction > BeginTransactionAsync ( string transactionName , CancellationToken cancellationToken = default ) => BeginTransactionAsync ( FbTransaction . DefaultIsolationLevel , transactionName , cancellationToken ) ;
312- public FbTransaction BeginTransaction ( IsolationLevel level , string transactionName ) => BeginTransactionImpl ( level , transactionName , new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
312+ public FbTransaction BeginTransaction ( IsolationLevel level , string transactionName ) => BeginTransactionImpl ( level , transactionName , AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
313313 public Task < FbTransaction > BeginTransactionAsync ( IsolationLevel level , string transactionName , CancellationToken cancellationToken = default ) => BeginTransactionImpl ( level , transactionName , new AsyncWrappingCommonArgs ( true , cancellationToken ) ) ;
314314 internal Task < FbTransaction > BeginTransactionImpl ( IsolationLevel level , string transactionName , AsyncWrappingCommonArgs async )
315315 {
@@ -320,7 +320,7 @@ internal Task<FbTransaction> BeginTransactionImpl(IsolationLevel level, string t
320320
321321 public FbTransaction BeginTransaction ( FbTransactionOptions options ) => BeginTransaction ( options , null ) ;
322322 public Task < FbTransaction > BeginTransactionAsync ( FbTransactionOptions options , CancellationToken cancellationToken = default ) => BeginTransactionAsync ( options , null , cancellationToken ) ;
323- public FbTransaction BeginTransaction ( FbTransactionOptions options , string transactionName ) => BeginTransactionImpl ( options , transactionName , new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
323+ public FbTransaction BeginTransaction ( FbTransactionOptions options , string transactionName ) => BeginTransactionImpl ( options , transactionName , AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
324324 public Task < FbTransaction > BeginTransactionAsync ( FbTransactionOptions options , string transactionName , CancellationToken cancellationToken = default ) => BeginTransactionImpl ( options , transactionName , new AsyncWrappingCommonArgs ( true , cancellationToken ) ) ;
325325 internal Task < FbTransaction > BeginTransactionImpl ( FbTransactionOptions options , string transactionName , AsyncWrappingCommonArgs async )
326326 {
@@ -352,7 +352,7 @@ public override void EnlistTransaction(System.Transactions.Transaction transacti
352352
353353 #region Database Schema Methods
354354
355- public override DataTable GetSchema ( ) => GetSchemaImpl ( new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
355+ public override DataTable GetSchema ( ) => GetSchemaImpl ( AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
356356#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1
357357 public Task < DataTable > GetSchemaAsync ( CancellationToken cancellationToken = default )
358358#else
@@ -364,7 +364,7 @@ private Task<DataTable> GetSchemaImpl(AsyncWrappingCommonArgs async)
364364 return GetSchemaImpl ( "MetaDataCollections" , async) ;
365365 }
366366
367- public override DataTable GetSchema ( string collectionName ) => GetSchemaImpl ( collectionName , new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
367+ public override DataTable GetSchema ( string collectionName ) => GetSchemaImpl ( collectionName , AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
368368#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1
369369 public Task < DataTable > GetSchemaAsync ( string collectionName , CancellationToken cancellationToken = default )
370370#else
@@ -375,7 +375,7 @@ private Task<DataTable> GetSchemaImpl(string collectionName, AsyncWrappingCommon
375375 {
376376 return GetSchemaImpl ( collectionName , null , async ) ;
377377 }
378- public override DataTable GetSchema ( string collectionName , string [ ] restrictions ) => GetSchemaImpl ( collectionName , restrictions , new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
378+ public override DataTable GetSchema ( string collectionName , string [ ] restrictions ) => GetSchemaImpl ( collectionName , restrictions , AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
379379#if NET48 || NETSTANDARD2_0 || NETSTANDARD2_1
380380 public Task < DataTable > GetSchemaAsync ( string collectionName , string [ ] restrictions , CancellationToken cancellationToken = default )
381381#else
@@ -403,7 +403,7 @@ protected override DbCommand CreateDbCommand()
403403 return new FbCommand ( null , this ) ;
404404 }
405405
406- public override void ChangeDatabase ( string db ) => ChangeDatabaseImpl ( db , new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
406+ public override void ChangeDatabase ( string db ) => ChangeDatabaseImpl ( db , AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
407407#if NET48 || NETSTANDARD2_0
408408 public Task ChangeDatabaseAsync ( string db , CancellationToken cancellationToken = default )
409409#else
@@ -441,7 +441,7 @@ private async Task ChangeDatabaseImpl(string db, AsyncWrappingCommonArgs async)
441441 }
442442 }
443443
444- public override void Open ( ) => OpenImpl ( new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
444+ public override void Open ( ) => OpenImpl ( AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
445445 public override Task OpenAsync ( CancellationToken cancellationToken ) => OpenImpl ( new AsyncWrappingCommonArgs ( true , cancellationToken ) ) ;
446446 internal async Task OpenImpl ( AsyncWrappingCommonArgs async )
447447 {
@@ -533,7 +533,7 @@ internal async Task OpenImpl(AsyncWrappingCommonArgs async)
533533 }
534534 }
535535
536- public override void Close ( ) => CloseImpl ( new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
536+ public override void Close ( ) => CloseImpl ( AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
537537#if NET48 || NETSTANDARD2_0
538538 public Task CloseAsync ( )
539539#else
@@ -624,7 +624,7 @@ private void OnStateChange(ConnectionState originalState, ConnectionState curren
624624 #endregion
625625
626626 #region Cancelation
627- public void EnableCancel ( ) => EnableCancelImpl ( new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
627+ public void EnableCancel ( ) => EnableCancelImpl ( AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
628628 public Task EnableCancelAsync ( CancellationToken cancellationToken = default ) => EnableCancelImpl ( new AsyncWrappingCommonArgs ( true , cancellationToken ) ) ;
629629 private Task EnableCancelImpl ( AsyncWrappingCommonArgs async )
630630 {
@@ -633,7 +633,7 @@ private Task EnableCancelImpl(AsyncWrappingCommonArgs async)
633633 return _innerConnection . EnableCancel ( async ) ;
634634 }
635635
636- public void DisableCancel ( ) => DisableCancelImpl ( new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
636+ public void DisableCancel ( ) => DisableCancelImpl ( AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
637637 public Task DisableCancelAsync ( CancellationToken cancellationToken = default ) => DisableCancelImpl ( new AsyncWrappingCommonArgs ( true , cancellationToken ) ) ;
638638 private Task DisableCancelImpl ( AsyncWrappingCommonArgs async )
639639 {
@@ -642,7 +642,7 @@ private Task DisableCancelImpl(AsyncWrappingCommonArgs async)
642642 return _innerConnection . DisableCancel ( async ) ;
643643 }
644644
645- public void CancelCommand ( ) => CancelCommandImpl ( new AsyncWrappingCommonArgs ( false ) ) . GetAwaiter ( ) . GetResult ( ) ;
645+ public void CancelCommand ( ) => CancelCommandImpl ( AsyncWrappingCommonArgs . Sync ) . GetAwaiter ( ) . GetResult ( ) ;
646646 public Task CancelCommandAsync ( CancellationToken cancellationToken = default ) => CancelCommandImpl ( new AsyncWrappingCommonArgs ( true , cancellationToken ) ) ;
647647 private Task CancelCommandImpl ( AsyncWrappingCommonArgs async )
648648 {
0 commit comments