提交 f32d318f 编写于 作者: M Marc Gravell

Merge branch 'CoreCLR'

Conflicts:
	Dapper NET40/SqlMapper.cs
此差异已折叠。
using System;
using System.Linq;
using System.Data.SqlClient;
using System.Threading.Tasks;
namespace Dapper.DNX.Tests
{
public class Program
{
public void Main()
{
Console.WriteLine("Version: {0}", Environment.Version);
const string connectionString = "Data Source=.;Initial Catalog=tempdb;Integrated Security=True";
using (var conn = new SqlConnection(connectionString))
{
conn.Open();
var row = conn.Query<Foo>("select @a as X", new { a = 123 }).Single();
Console.WriteLine(row.X);
var methods = typeof(Dapper.SqlMapper).GetMethods().Where(x => x.Name == "QueryAsync").ToList();
row = conn.QueryAsync<Foo>("select @a as X", new { a = 123 }).Result.Single();
Console.WriteLine(row.X);
}
}
private static async Task<int> WithDelay(int i)
{
await Task.Delay(100);
return i;
}
class Foo
{
public int X { get; set; }
}
}
}
{
"version": "1.0.0-*",
"dependencies": {
"Dapper": "1.41-*"
"version": "1.0.0-*",
"dependencies": {
"Dapper": "1.41-*"
},
"commands": {
"Dapper.DNX.Tests": "Dapper.DNX.Tests"
},
"compile": [ "../Tests/Tests.cs", "../Tests/Program.cs", "../Tests/Assert.cs" ],
"compilationOptions": { "define": [ "NOEXTERNALS" ] },
"frameworks": {
"net45": {
"compilationOptions": { "define": [ "ASYNC" ], "warningsAsErrors": true },
"dependencies": {
"System.Threading.Thread": "4.0.0-beta-22816"
},
"frameworkAssemblies": {
"System.Data": "4.0.0.0",
"System.Xml": "4.0.0.0"
}
},
"commands": {
"Dapper.DNX.Tests": "Dapper.DNX.Tests"
"net40": {
"dependencies": {
},
"frameworkAssemblies": {
"System.Data": "4.0.0.0",
"System.Xml": "4.0.0.0"
}
},
"compilationOptions": {"define": ["ASYNC"]},
"frameworks": {
"net45": {
"dependencies": {
},
"frameworkAssemblies": {
"System.Data": "4.0.0.0"
}
},
//"net40": {
// "dependencies": {
// },
// "frameworkAssemblies": {
// "System.Data": "4.0.0.0"
// }
//},
"dnx451": {
"frameworkAssemblies": {
"System.Data": "4.0.0.0"
}
"dnx451": {
"compilationOptions": { "define": [ "ASYNC" ], "warningsAsErrors": true },
"frameworkAssemblies": {
"System.Data": "4.0.0.0",
"System.Xml": "4.0.0.0"
}
}
//"dnxcore50" : {
// "dependencies": {
// "System.Console": "4.0.0-beta-22716"
// }
//}
},
"dnxcore50": {
"compilationOptions": { "define": [ ], "warningsAsErrors": true },
"dependencies": {
"System.Console": "4.0.0-beta-*",
"System.Reflection": "4.0.10-beta-*",
"System.Linq": "4.0.0-beta-*",
"System.Data.Common": "4.0.0-beta-*",
"System.Data.SqlClient": "4.0.0-beta-*",
"System.Threading": "4.0.10-beta-*",
"System.Threading.Thread": "4.0.0-beta-*",
"System.Reflection.TypeExtensions": "4.0.0-beta-*"
//"System.Xml": "4.0.10-beta-*"
}
}
}
}
此差异已折叠。

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22728.1
VisualStudioVersion = 14.0.22823.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Dapper", "Dapper\Dapper.xproj", "{088D8CC4-E71E-44B6-9B87-4060B043983D}"
EndProject
......@@ -9,8 +9,11 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Dapper.DNX.Tests", "Dapper.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{03340C6E-4176-4C42-9C76-D5DFC79D1A22}"
ProjectSection(SolutionItems) = preProject
Tests\Assert.cs = Tests\Assert.cs
Tests\Program.cs = Tests\Program.cs
Dapper NET40\SqlMapper.cs = Dapper NET40\SqlMapper.cs
Dapper NET45\SqlMapperAsync.cs = Dapper NET45\SqlMapperAsync.cs
Tests\Tests.cs = Tests\Tests.cs
EndProjectSection
EndProject
Global
......
......@@ -14,6 +14,9 @@
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AssemblyName>Dapper</AssemblyName>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AssemblyName>Dapper</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
......
{
"authors": [ "Sam Saffron", "Marc Gravell" ],
"owners": [ "Sam Saffron", "Marc Gravell" ],
"projectUrl": "https://github.com/StackExchange/dapper-dot-net",
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0",
"summary": "A high performance Micro-ORM",
"description": "A high performance Micro-ORM supporting Sql Server, MySQL, Sqlite, SqlCE, Firebird etc..",
"version": "1.41-alpha",
"version": "1.41-beta3",
"compile": [ "../Dapper NET40/*.cs", "../Dapper NET45/*.cs" ],
"title": "Dapper dot net",
"tags": [ "orm", "sql", "micro-orm" ],
"frameworks": {
"net45": {
"compilationOptions": { "define": [ "ASYNC" ], "warningsAsErrors": true },
"dependencies": {
"System.Runtime": "4.0.20-beta-22816"
},
"frameworkAssemblies": {
"System.Data": "4.0.0.0"
......@@ -20,6 +27,14 @@
"System.Data": "4.0.0.0"
}
},
//"net35": {
// "compilationOptions": { "warningsAsErrors": true, "languageVersion": "csharp3", "define": ["CSHARP30"] },
// "dependencies": {
// },
// "frameworkAssemblies": {
// "System.Data": "4.0.0.0"
// }
//},
"dnx451": {
"compilationOptions": { "define": [ "ASYNC" ], "warningsAsErrors": true },
"dependencies": {
......@@ -28,15 +43,25 @@
"System.Data": "4.0.0.0"
}
},
//"dnxcore50": {
// "dependencies": {
// "System.Runtime": "4.0.20-beta-22716",
// "System.Data.Common": "4.0.0-beta-*",
// },
// "frameworkAssemblies": {
// //
// }
//}
"dnxcore50": {
"compilationOptions": { "define": [ ], "warningsAsErrors": true },
"dependencies": {
"System.Text.RegularExpressions": "4.0.10-beta-*",
"System.Collections": "4.0.10-beta-*",
"System.Collections.Concurrent": "4.0.10-beta-*",
"System.Linq": "4.0.0-beta-*",
"System.Threading": "4.0.10-beta-*",
"Microsoft.CSharp": "4.0.0-beta-*",
"System.Reflection": "4.0.10-beta-*",
"System.Reflection.Emit": "4.0.0-beta-*",
"System.Reflection.Emit.ILGeneration": "4.0.0-beta-*",
"System.Reflection.Emit.Lightweight": "4.0.0-beta-*",
"System.Reflection.TypeExtensions": "4.0.0-beta-*",
"System.Data.Common": "4.0.0-beta-*",
"System.Runtime.Extensions": "4.0.10-beta-*",
"System.Text.Encoding.CodePages": "4.0.0-beta-*",
"System.Globalization": "4.0.10-beta-*"
}
}
}
}
此差异已折叠。
......@@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
<DefineConstants>TRACE;DEBUG;NET35 EXTERNALS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
......@@ -30,9 +30,10 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NET35</DefineConstants>
<DefineConstants>TRACE;NET35 EXTERNALS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
......
......@@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;EXTERNALS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
......@@ -28,7 +28,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;EXTERNALS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
......
......@@ -3,6 +3,10 @@
using System.Linq;
using System.Text;
#if DNXCORE50
using ApplicationException = global::System.InvalidOperationException;
#endif
namespace SqlMapper
{
static class Assert
......
......@@ -22,7 +22,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;EXTERNALS PERF</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
......@@ -32,10 +32,11 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;EXTERNALS PERF</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="BLToolkit.4">
......
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册