Commit 523f7c8d authored by Nick Craver's avatar Nick Craver

Cleanup, organize project.json orders

parent 89d44089
......@@ -20,26 +20,26 @@
"warningsAsErrors": true
},
"frameworks": {
"net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"net40": {
"frameworkAssemblies": {
"System.Data": "4.0.0.0",
"System.Runtime": "4.0.0.0",
"System.Xml": "4.0.0.0"
},
"dependencies": {
"xunit": "2.1.0"
"xunit": "1.9.2"
}
},
"net40": {
"net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": {
"System.Data": "4.0.0.0",
"System.Runtime": "4.0.0.0",
"System.Xml": "4.0.0.0"
},
"dependencies": {
"xunit": "1.9.2"
"xunit": "2.1.0"
}
},
"dotnet5.4": {
......
......@@ -20,15 +20,15 @@
"warningsAsErrors": true
},
"frameworks": {
"net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"net40": {
"frameworkAssemblies": {
"System.Data": "4.0.0.0"
}
},
"net40": {
"net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": {
"System.Data": "4.0.0.0"
}
......
......@@ -18,8 +18,6 @@
namespace Dapper
{
public static partial class SqlMapper
{
......@@ -511,7 +509,7 @@ private static async Task<IEnumerable<TReturn>> MultiMapAsync<TReturn>(this IDbC
}
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);
bool wasClosed = cnn.State == ConnectionState.Closed;
try {
......@@ -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)
{
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);
DbCommand cmd = null;
......@@ -713,7 +711,8 @@ public static Task<T> ExecuteScalarAsync<T>(this IDbConnection cnn, CommandDefin
{
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;
object param = command.Parameters;
......
......@@ -16,16 +16,16 @@
"warningsAsErrors": true
},
"frameworks": {
"net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"net40": {
"frameworkAssemblies": {
"System.Data": "4.0.0.0",
"System.Xml": "4.0.0.0"
}
},
"net40": {
"net45": {
"compilationOptions": {
"define": [ "ASYNC" ]
},
"frameworkAssemblies": {
"System.Data": "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