diff --git a/Dapper.Contrib/SqlMapperExtensions.Async.cs b/Dapper.Contrib/SqlMapperExtensions.Async.cs index 35ca1077..b721c228 100644 --- a/Dapper.Contrib/SqlMapperExtensions.Async.cs +++ b/Dapper.Contrib/SqlMapperExtensions.Async.cs @@ -1,5 +1,4 @@ -#if ASYNC -using System; +using System; using System.Collections.Generic; using System.Data; using System.Linq; @@ -532,4 +531,3 @@ public partial class FbAdapter return Convert.ToInt32(id); } } -#endif diff --git a/Dapper.Rainbow/Database.Async.cs b/Dapper.Rainbow/Database.Async.cs index be63fa6e..06ab4756 100644 --- a/Dapper.Rainbow/Database.Async.cs +++ b/Dapper.Rainbow/Database.Async.cs @@ -1,5 +1,4 @@ -#if ASYNC -using System; +using System; using System.Collections.Generic; using System.Data; using System.Linq; @@ -210,4 +209,3 @@ namespace Dapper SqlMapper.QueryMultipleAsync(_connection, sql, param, transaction, commandTimeout, commandType); } } -#endif \ No newline at end of file diff --git a/Dapper.Tests/Providers/EntityFrameworkTests.cs b/Dapper.Tests/Providers/EntityFrameworkTests.cs index 150492a6..1dbc26bf 100644 --- a/Dapper.Tests/Providers/EntityFrameworkTests.cs +++ b/Dapper.Tests/Providers/EntityFrameworkTests.cs @@ -11,8 +11,7 @@ namespace Dapper.Tests.Providers { EntityFramework.Handlers.Register(); } - -#if ASYNC // TODO: Temp workaround in tests + [Fact] public void Issue570_DbGeo_HasValues() { @@ -27,7 +26,6 @@ namespace Dapper.Tests.Providers Assert.NotNull(fromDb.Area); Assert.Equal(orig.Area, fromDb.Area); } -#endif [Fact] public void Issue22_ExecuteScalar_EntityFramework() diff --git a/Dapper/CommandDefinition.cs b/Dapper/CommandDefinition.cs index 4e6518e4..110cd5b2 100644 --- a/Dapper/CommandDefinition.cs +++ b/Dapper/CommandDefinition.cs @@ -73,7 +73,6 @@ namespace Dapper /// public bool Pipelined => (Flags & CommandFlags.Pipelined) != 0; -#if ASYNC /// /// Initialize the command definition /// @@ -84,22 +83,9 @@ namespace Dapper /// The for this command. /// The behavior flags for this command. /// The cancellation token for this command. -#else - /// - /// Initialize the command definition - /// - /// The text for this command. - /// The parameters for this command. - /// The transaction for this command to participate in. - /// The timeout (in seconds) for this command. - /// The for this command. - /// The behavior flags for this command. -#endif public CommandDefinition(string commandText, object parameters = null, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null, CommandFlags flags = CommandFlags.Buffered -#if ASYNC , CancellationToken cancellationToken = default(CancellationToken) -#endif ) { CommandText = commandText; @@ -108,9 +94,7 @@ namespace Dapper CommandTimeout = commandTimeout; CommandType = commandType; Flags = flags; -#if ASYNC CancellationToken = cancellationToken; -#endif } private CommandDefinition(object parameters) : this() @@ -118,13 +102,10 @@ namespace Dapper Parameters = parameters; } -#if ASYNC - /// /// For asynchronous operations, the cancellation-token /// public CancellationToken CancellationToken { get; } -#endif internal IDbCommand SetupCommand(IDbConnection cnn, Action paramReader) { @@ -201,4 +182,4 @@ namespace Dapper return null; } } -} \ No newline at end of file +} diff --git a/Dapper/SqlMapper.Async.cs b/Dapper/SqlMapper.Async.cs index 5845b988..a705307a 100644 --- a/Dapper/SqlMapper.Async.cs +++ b/Dapper/SqlMapper.Async.cs @@ -1,5 +1,4 @@ -#if ASYNC -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Data; @@ -1190,4 +1189,3 @@ namespace Dapper } } } -#endif \ No newline at end of file diff --git a/Dapper/SqlMapper.GridReader.Async.cs b/Dapper/SqlMapper.GridReader.Async.cs index c39f0551..89528826 100644 --- a/Dapper/SqlMapper.GridReader.Async.cs +++ b/Dapper/SqlMapper.GridReader.Async.cs @@ -1,5 +1,4 @@ -#if ASYNC -using System; +using System; using System.Collections.Generic; using System.Data; using System.Data.Common; @@ -246,4 +245,3 @@ namespace Dapper } } } -#endif \ No newline at end of file diff --git a/Dapper/SqlMapper.cs b/Dapper/SqlMapper.cs index b4db316e..86f4f8ca 100644 --- a/Dapper/SqlMapper.cs +++ b/Dapper/SqlMapper.cs @@ -1,4 +1,4 @@ -/* +/* License: http://www.apache.org/licenses/LICENSE-2.0 Home page: https://github.com/StackExchange/dapper-dot-net */ @@ -516,13 +516,11 @@ namespace Dapper CacheInfo info = null; if (multiExec != null) { -#if ASYNC if((command.Flags & CommandFlags.Pipelined) != 0) { // this includes all the code for concurrent/overlapped query return ExecuteMultiImplAsync(cnn, command, multiExec).Result; } -#endif bool isFirst = true; int total = 0; bool wasClosed = cnn.State == ConnectionState.Closed; @@ -3693,4 +3691,4 @@ namespace Dapper return s; } } -} \ No newline at end of file +} diff --git a/Directory.build.props b/Directory.build.props index 776838ac..ce63460a 100644 --- a/Directory.build.props +++ b/Directory.build.props @@ -26,10 +26,6 @@ - - $(DefineConstants);ASYNC - -