Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 13 additions & 73 deletions AsyncDataAdapter.Tests/AsyncDataAdapter.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,79 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{34B7E6F3-858A-489B-BDD0-45CC6EB62551}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AsyncDataAdapter.Tests</RootNamespace>
<AssemblyName>AsyncDataAdapter.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFramework>netstandard2.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=3.10.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SqlClient, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SqlClient.4.5.1\lib\net461\System.Data.SqlClient.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="HelpersTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SqlDataAdapterTest.cs" />
</ItemGroup>

<ItemGroup>
<None Include="packages.config" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AsyncDataAdapter\AsyncDataAdapter.csproj">
<Project>{0384745d-0e1d-4f87-a24e-2cf5762faab1}</Project>
<Name>AsyncDataAdapter</Name>
</ProjectReference>
<ProjectReference Include="..\AsyncDataAdapter\AsyncDataAdapter.csproj" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.10.1\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
6 changes: 0 additions & 6 deletions AsyncDataAdapter.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AsyncDataAdapter.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("AsyncDataAdapter.Tests")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Expand All @@ -32,5 +28,3 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
10 changes: 5 additions & 5 deletions AsyncDataAdapter.Tests/SqlDataAdapterTest.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using System;
using System.Data;
using System.Data.SqlClient;
using System.Threading.Tasks;
using Microsoft.Data.SqlClient;
using NUnit.Framework;

namespace AsyncDataAdapter.Tests
{
[TestFixture]
public class SqlDataAdapterTest
{
// private const string ConnectionString = @"server=.\sqlexpress;database=TestDb;Trusted_Connection=Yes";
//private const string ConnectionString = @"server=.\sqlexpress;database=TestDb;Trusted_Connection=Yes";
private const string ConnectionString = @"server=.\SQL2017;database=TestDb;Trusted_Connection=Yes";

[Test]
Expand Down Expand Up @@ -54,7 +54,7 @@ public void FillDataTable()
c.CommandType = CommandType.StoredProcedure;
c.Parameters.Add("@Number", SqlDbType.Int).Value = 100000;

using (var a = new System.Data.SqlClient.SqlDataAdapter(c))
using (var a = new Microsoft.Data.SqlClient.SqlDataAdapter(c))
{
var dt = new DataTable();
var r = a.Fill(dt);
Expand Down Expand Up @@ -113,7 +113,7 @@ public void FillDataSet()
c.CommandType = CommandType.StoredProcedure;
c.Parameters.Add("@Number", SqlDbType.Int).Value = 100000;

using (var a = new System.Data.SqlClient.SqlDataAdapter(c))
using (var a = new Microsoft.Data.SqlClient.SqlDataAdapter(c))
{
var ds = new DataSet();
var r = a.Fill(ds);
Expand Down Expand Up @@ -196,7 +196,7 @@ public void FillDataSetMulti()
c.Parameters.Add("@Number2", SqlDbType.Int).Value = 300000;
c.Parameters.Add("@Number3", SqlDbType.Int).Value = 500000;

using (var a = new System.Data.SqlClient.SqlDataAdapter(c))
using (var a = new Microsoft.Data.SqlClient.SqlDataAdapter(c))
{
var ds = new DataSet();
var r = a.Fill(ds);
Expand Down
16 changes: 8 additions & 8 deletions AsyncDataAdapter.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2019
# Visual Studio Version 16
VisualStudioVersion = 16.0.29728.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AsyncDataAdapter", "AsyncDataAdapter\AsyncDataAdapter.csproj", "{0384745D-0E1D-4F87-A24E-2CF5762FAAB1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsyncDataAdapter.Tests", "AsyncDataAdapter.Tests\AsyncDataAdapter.Tests.csproj", "{34B7E6F3-858A-489B-BDD0-45CC6EB62551}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{366B2040-653C-4536-86F6-7A8B8765D6AF}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
Expand All @@ -18,6 +16,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsyncDataAdapter.Tests", "AsyncDataAdapter.Tests\AsyncDataAdapter.Tests.csproj", "{F53AB0CC-DFBC-4D41-A0E6-B670FDABF67A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -28,10 +28,10 @@ Global
{0384745D-0E1D-4F87-A24E-2CF5762FAAB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0384745D-0E1D-4F87-A24E-2CF5762FAAB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0384745D-0E1D-4F87-A24E-2CF5762FAAB1}.Release|Any CPU.Build.0 = Release|Any CPU
{34B7E6F3-858A-489B-BDD0-45CC6EB62551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34B7E6F3-858A-489B-BDD0-45CC6EB62551}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34B7E6F3-858A-489B-BDD0-45CC6EB62551}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34B7E6F3-858A-489B-BDD0-45CC6EB62551}.Release|Any CPU.Build.0 = Release|Any CPU
{F53AB0CC-DFBC-4D41-A0E6-B670FDABF67A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F53AB0CC-DFBC-4D41-A0E6-B670FDABF67A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F53AB0CC-DFBC-4D41-A0E6-B670FDABF67A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F53AB0CC-DFBC-4D41-A0E6-B670FDABF67A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion AsyncDataAdapter/AsyncDataAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.5.1" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions AsyncDataAdapter/DataAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ override protected void Dispose(bool disposing)
base.Dispose(disposing); // notify base classes
}

virtual public async Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType)
virtual public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType)
{ // V1.0.3300
throw ADP.NotSupported();
}
Expand Down Expand Up @@ -490,7 +490,7 @@ internal async Task<object> FillSchemaFromReaderAsync(DataSet dataset, DataTable
return value; // null if datatable had no results
}

virtual public async Task<int> FillAsync(DataSet dataSet)
virtual public Task<int> FillAsync(DataSet dataSet)
{ // V1.0.3300
throw ADP.NotSupported();
}
Expand Down Expand Up @@ -903,7 +903,7 @@ private void OnFillErrorHandler(Exception e, DataTable dataTable, object[] dataV
}
}

virtual public async Task<int> UpdateAsync(DataSet dataSet)
virtual public Task<int> UpdateAsync(DataSet dataSet)
{ // V1.0.3300
throw ADP.NotSupported();
}
Expand Down
2 changes: 1 addition & 1 deletion AsyncDataAdapter/SqlCommandSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
Expand Down
2 changes: 1 addition & 1 deletion AsyncDataAdapter/SqlDataAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Diagnostics;

namespace AsyncDataAdapter
Expand Down