Commit 5f569d92 authored by Nick Craver's avatar Nick Craver

Cleanup, organize project.json orders

parent 9ae3d50b
...@@ -20,26 +20,26 @@ ...@@ -20,26 +20,26 @@
"warningsAsErrors": true "warningsAsErrors": true
}, },
"frameworks": { "frameworks": {
"net45": { "net40": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Data": "4.0.0.0", "System.Data": "4.0.0.0",
"System.Runtime": "4.0.0.0",
"System.Xml": "4.0.0.0" "System.Xml": "4.0.0.0"
}, },
"dependencies": { "dependencies": {
"xunit": "2.1.0" "xunit": "1.9.2"
} }
}, },
"net40": { "net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Data": "4.0.0.0", "System.Data": "4.0.0.0",
"System.Runtime": "4.0.0.0",
"System.Xml": "4.0.0.0" "System.Xml": "4.0.0.0"
}, },
"dependencies": { "dependencies": {
"xunit": "1.9.2" "xunit": "2.1.0"
} }
}, },
"dotnet5.4": { "dotnet5.4": {
......
...@@ -20,15 +20,15 @@ ...@@ -20,15 +20,15 @@
"warningsAsErrors": true "warningsAsErrors": true
}, },
"frameworks": { "frameworks": {
"net45": { "net40": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Data": "4.0.0.0" "System.Data": "4.0.0.0"
} }
}, },
"net40": { "net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Data": "4.0.0.0" "System.Data": "4.0.0.0"
} }
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
namespace Dapper namespace Dapper
{ {
public static partial class SqlMapper public static partial class SqlMapper
{ {
...@@ -511,7 +509,7 @@ private static async Task<IEnumerable<TReturn>> MultiMapAsync<TReturn>(this IDbC ...@@ -511,7 +509,7 @@ private static async Task<IEnumerable<TReturn>> MultiMapAsync<TReturn>(this IDbC
} }
object param = command.Parameters; object param = command.Parameters;
var identity = new Identity(command.CommandText, command.CommandType, cnn, types[0], param == null ? null : param.GetType(), types); var identity = new Identity(command.CommandText, command.CommandType, cnn, types[0], param?.GetType(), types);
var info = GetCacheInfo(identity, param, command.AddToCache); var info = GetCacheInfo(identity, param, command.AddToCache);
bool wasClosed = cnn.State == ConnectionState.Closed; bool wasClosed = cnn.State == ConnectionState.Closed;
try { try {
...@@ -561,7 +559,7 @@ private static IEnumerable<T> ExecuteReaderSync<T>(IDataReader reader, Func<IDat ...@@ -561,7 +559,7 @@ private static IEnumerable<T> ExecuteReaderSync<T>(IDataReader reader, Func<IDat
public static async Task<GridReader> QueryMultipleAsync(this IDbConnection cnn, CommandDefinition command) public static async Task<GridReader> QueryMultipleAsync(this IDbConnection cnn, CommandDefinition command)
{ {
object param = command.Parameters; object param = command.Parameters;
Identity identity = new Identity(command.CommandText, command.CommandType, cnn, typeof(GridReader), param == null ? null : param.GetType(), null); Identity identity = new Identity(command.CommandText, command.CommandType, cnn, typeof(GridReader), param?.GetType(), null);
CacheInfo info = GetCacheInfo(identity, param, command.AddToCache); CacheInfo info = GetCacheInfo(identity, param, command.AddToCache);
DbCommand cmd = null; DbCommand cmd = null;
...@@ -713,7 +711,8 @@ public static Task<T> ExecuteScalarAsync<T>(this IDbConnection cnn, CommandDefin ...@@ -713,7 +711,8 @@ public static Task<T> ExecuteScalarAsync<T>(this IDbConnection cnn, CommandDefin
{ {
return ExecuteScalarImplAsync<T>(cnn, command); return ExecuteScalarImplAsync<T>(cnn, command);
} }
private async static Task<T> ExecuteScalarImplAsync<T>(IDbConnection cnn, CommandDefinition command)
private static async Task<T> ExecuteScalarImplAsync<T>(IDbConnection cnn, CommandDefinition command)
{ {
Action<IDbCommand, object> paramReader = null; Action<IDbCommand, object> paramReader = null;
object param = command.Parameters; object param = command.Parameters;
......
...@@ -16,16 +16,16 @@ ...@@ -16,16 +16,16 @@
"warningsAsErrors": true "warningsAsErrors": true
}, },
"frameworks": { "frameworks": {
"net45": { "net40": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Data": "4.0.0.0", "System.Data": "4.0.0.0",
"System.Xml": "4.0.0.0" "System.Xml": "4.0.0.0"
} }
}, },
"net40": { "net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": { "frameworkAssemblies": {
"System.Data": "4.0.0.0", "System.Data": "4.0.0.0",
"System.Xml": "4.0.0.0" "System.Xml": "4.0.0.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment