diff --git a/AsyncDataAdapter.Tests/AsyncDataAdapter.Tests.csproj b/AsyncDataAdapter.Tests/AsyncDataAdapter.Tests.csproj index 4230cc6..0b7d7fa 100644 --- a/AsyncDataAdapter.Tests/AsyncDataAdapter.Tests.csproj +++ b/AsyncDataAdapter.Tests/AsyncDataAdapter.Tests.csproj @@ -1,68 +1,79 @@ - - - - - Debug - AnyCPU - {34B7E6F3-858A-489B-BDD0-45CC6EB62551} - Library - Properties - AsyncDataAdapter.Tests - AsyncDataAdapter.Tests - v4.5.2 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll - True - - - - - - - - - - - - - - - - - - {0384745d-0e1d-4f87-a24e-2cf5762faab1} - AsyncDataAdapter - - - - - - + + + + + + Debug + AnyCPU + {34B7E6F3-858A-489B-BDD0-45CC6EB62551} + Library + Properties + AsyncDataAdapter.Tests + AsyncDataAdapter.Tests + v4.6.2 + 512 + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll + + + + + + ..\packages\System.Data.SqlClient.4.5.1\lib\net461\System.Data.SqlClient.dll + + + + + + + + + + + + + + + + + {0384745d-0e1d-4f87-a24e-2cf5762faab1} + AsyncDataAdapter + + + + + + 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}. + + + + --> \ No newline at end of file diff --git a/AsyncDataAdapter.Tests/SqlDataAdapterTest.cs b/AsyncDataAdapter.Tests/SqlDataAdapterTest.cs index 68cc355..22850e4 100644 --- a/AsyncDataAdapter.Tests/SqlDataAdapterTest.cs +++ b/AsyncDataAdapter.Tests/SqlDataAdapterTest.cs @@ -10,7 +10,7 @@ namespace AsyncDataAdapter.Tests public class SqlDataAdapterTest { // private const string ConnectionString = @"server=.\sqlexpress;database=TestDb;Trusted_Connection=Yes"; - private const string ConnectionString = @"server=.\SQL2012SP1;database=TestDb;Trusted_Connection=Yes"; + private const string ConnectionString = @"server=.\SQL2017;database=TestDb;Trusted_Connection=Yes"; [Test] public async Task FillAsyncDataTable() diff --git a/AsyncDataAdapter.Tests/packages.config b/AsyncDataAdapter.Tests/packages.config index 1919c1b..556aa63 100644 --- a/AsyncDataAdapter.Tests/packages.config +++ b/AsyncDataAdapter.Tests/packages.config @@ -1,11 +1,13 @@ - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AsyncDataAdapter.msbuild b/AsyncDataAdapter.msbuild index 51c762f..35f8e85 100644 --- a/AsyncDataAdapter.msbuild +++ b/AsyncDataAdapter.msbuild @@ -17,13 +17,11 @@ - - - - + + @@ -33,20 +31,10 @@ + - - - - - - - - AsyncDataAdapter - - - - - + + diff --git a/AsyncDataAdapter.nuspec b/AsyncDataAdapter.nuspec deleted file mode 100644 index 3505e7f..0000000 --- a/AsyncDataAdapter.nuspec +++ /dev/null @@ -1,17 +0,0 @@ - - - - AsyncDataAdapter - $Version$ - Vladimir Kloz - Vladimir Kloz - https://github.com/voloda/AsyncDataAdapter/blob/master/LICENSE - https://github.com/voloda/AsyncDataAdapter - false - AsyncDataAdapter is implementation of SqlDataAdapter with supports async/await. - - - Copyright 2016 Vladimir Kloz - DataAdapter DbDataAdapter SqlDataAdapter - - diff --git a/AsyncDataAdapter.sln b/AsyncDataAdapter.sln index 90ddfba..058b328 100644 --- a/AsyncDataAdapter.sln +++ b/AsyncDataAdapter.sln @@ -1,40 +1,42 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "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 - appveyor.yml = appveyor.yml - AsyncDataAdapter.msbuild = AsyncDataAdapter.msbuild - AsyncDataAdapter.nuspec = AsyncDataAdapter.nuspec - DbSetup.sql = DbSetup.sql - LICENSE = LICENSE - Properties.xml = Properties.xml - README.md = README.md - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0384745D-0E1D-4F87-A24E-2CF5762FAAB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {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 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2019 +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 + appveyor.yml = appveyor.yml + AsyncDataAdapter.msbuild = AsyncDataAdapter.msbuild + DbSetup.sql = DbSetup.sql + LICENSE = LICENSE + Properties.xml = Properties.xml + README.md = README.md + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0384745D-0E1D-4F87-A24E-2CF5762FAAB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ABB37006-C016-409A-88C0-B3E06924773D} + EndGlobalSection +EndGlobal diff --git a/AsyncDataAdapter/ADP.cs b/AsyncDataAdapter/ADP.cs index 96e7dfb..ffca415 100644 --- a/AsyncDataAdapter/ADP.cs +++ b/AsyncDataAdapter/ADP.cs @@ -19,10 +19,6 @@ namespace AsyncDataAdapter using System.ComponentModel; using System.Configuration; using System.Data; - using System.Data.ProviderBase; - using System.Data.Odbc; - using System.Data.OleDb; - using System.Data.Sql; using System.Data.SqlTypes; using System.Diagnostics; using System.Globalization; @@ -33,7 +29,6 @@ namespace AsyncDataAdapter using System.Runtime.Serialization; using System.Security; using System.Security.Permissions; - using System.Data.SqlClient; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -192,18 +187,18 @@ static internal ArgumentOutOfRangeException ArgumentOutOfRange(string message, s TraceExceptionAsReturnValue(e); return e; } - static internal ConfigurationException Configuration(string message) - { - ConfigurationException e = new ConfigurationErrorsException(message); - TraceExceptionAsReturnValue(e); - return e; - } - static internal ConfigurationException Configuration(string message, XmlNode node) - { - ConfigurationException e = new ConfigurationErrorsException(message, node); - TraceExceptionAsReturnValue(e); - return e; - } + //static internal ConfigurationException Configuration(string message) + //{ + // ConfigurationException e = new ConfigurationErrorsException(message); + // TraceExceptionAsReturnValue(e); + // return e; + //} + //static internal ConfigurationException Configuration(string message, XmlNode node) + //{ + // ConfigurationException e = new ConfigurationErrorsException(message, node); + // TraceExceptionAsReturnValue(e); + // return e; + //} static internal DataException Data(string message) { DataException e = new DataException(message); @@ -709,19 +704,19 @@ static internal ArgumentOutOfRangeException InvalidParameterDirection(ParameterD return InvalidEnumerationValue(typeof(ParameterDirection), (int)value); } - static internal ArgumentOutOfRangeException InvalidPermissionState(PermissionState value) - { -#if DEBUG - switch (value) - { - case PermissionState.Unrestricted: - case PermissionState.None: - Debug.Assert(false, "valid PermissionState " + value.ToString()); - break; - } -#endif - return InvalidEnumerationValue(typeof(PermissionState), (int)value); - } +// static internal ArgumentOutOfRangeException InvalidPermissionState(PermissionState value) +// { +//#if DEBUG +// switch (value) +// { +// case PermissionState.Unrestricted: +// case PermissionState.None: +// Debug.Assert(false, "valid PermissionState " + value.ToString()); +// break; +// } +//#endif +// return InvalidEnumerationValue(typeof(PermissionState), (int)value); +// } static internal ArgumentOutOfRangeException InvalidRule(Rule value) { @@ -816,25 +811,25 @@ static internal ArgumentOutOfRangeException NotSupportedStatementType(StatementT return NotSupportedEnumerationValue(typeof(StatementType), value.ToString(), method); } - static internal ArgumentOutOfRangeException InvalidUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value) - { -#if DEBUG - switch (value) - { - case Microsoft.SqlServer.Server.Format.Unknown: - case Microsoft.SqlServer.Server.Format.Native: - case Microsoft.SqlServer.Server.Format.UserDefined: - Debug.Assert(false, "valid UserDefinedTypeSerializationFormat " + value.ToString()); - break; - } -#endif - return InvalidEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), (int)value); - } +// static internal ArgumentOutOfRangeException InvalidUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value) +// { +//#if DEBUG +// switch (value) +// { +// case Microsoft.SqlServer.Server.Format.Unknown: +// case Microsoft.SqlServer.Server.Format.Native: +// case Microsoft.SqlServer.Server.Format.UserDefined: +// Debug.Assert(false, "valid UserDefinedTypeSerializationFormat " + value.ToString()); +// break; +// } +//#endif +// return InvalidEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), (int)value); +// } - static internal ArgumentOutOfRangeException NotSupportedUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value, string method) - { - return ADP.NotSupportedEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), value.ToString(), method); - } +// static internal ArgumentOutOfRangeException NotSupportedUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value, string method) +// { +// return ADP.NotSupportedEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), value.ToString(), method); +// } // // DbProviderFactories @@ -2360,13 +2355,13 @@ static private long TimerToSeconds(long timerValue) return result; } - [EnvironmentPermission(SecurityAction.Assert, Read = "COMPUTERNAME")] - static internal string MachineName() - { - // Note: In Longhorn you'll be able to rename a machine without - // rebooting. Therefore, don't cache this machine name. - return Environment.MachineName; - } + //[EnvironmentPermission(SecurityAction.Assert, Read = "COMPUTERNAME")] + //static internal string MachineName() + //{ + // // Note: In Longhorn you'll be able to rename a machine without + // // rebooting. Therefore, don't cache this machine name. + // return Environment.MachineName; + //} static internal string BuildQuotedString(string quotePrefix, string quoteSuffix, string unQuotedString) { @@ -2469,13 +2464,13 @@ static internal string BuildQuotedString(string quotePrefix, string quoteSuffix, // return returnString; //} - [FileIOPermission(SecurityAction.Assert, AllFiles = FileIOPermissionAccess.PathDiscovery)] - [ResourceExposure(ResourceScope.Machine)] - [ResourceConsumption(ResourceScope.Machine)] - static internal string GetFullPath(string filename) - { // MDAC 77686 - return Path.GetFullPath(filename); - } + //[FileIOPermission(SecurityAction.Assert, AllFiles = FileIOPermissionAccess.PathDiscovery)] + //[ResourceExposure(ResourceScope.Machine)] + //[ResourceConsumption(ResourceScope.Machine)] + //static internal string GetFullPath(string filename) + //{ // MDAC 77686 + // return Path.GetFullPath(filename); + //} // //static internal string GetComputerNameDnsFullyQualified() @@ -2519,35 +2514,35 @@ static internal string GetFullPath(string filename) // SxS: the file is opened in FileShare.Read mode allowing several threads/apps to read it simultaneously - [ResourceExposure(ResourceScope.Machine)] - [ResourceConsumption(ResourceScope.Machine)] - static internal Stream GetFileStream(string filename) - { - (new FileIOPermission(FileIOPermissionAccess.Read, filename)).Assert(); - try - { - return new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); - } - finally - { - FileIOPermission.RevertAssert(); - } - } + //[ResourceExposure(ResourceScope.Machine)] + //[ResourceConsumption(ResourceScope.Machine)] + //static internal Stream GetFileStream(string filename) + //{ + // (new FileIOPermission(FileIOPermissionAccess.Read, filename)).Assert(); + // try + // { + // return new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); + // } + // finally + // { + // FileIOPermission.RevertAssert(); + // } + //} - [ResourceExposure(ResourceScope.Machine)] - [ResourceConsumption(ResourceScope.Machine)] - static internal FileVersionInfo GetVersionInfo(string filename) - { - (new FileIOPermission(FileIOPermissionAccess.Read, filename)).Assert(); // MDAC 62038 - try - { - return FileVersionInfo.GetVersionInfo(filename); // MDAC 60411 - } - finally - { - FileIOPermission.RevertAssert(); - } - } + //[ResourceExposure(ResourceScope.Machine)] + //[ResourceConsumption(ResourceScope.Machine)] + //static internal FileVersionInfo GetVersionInfo(string filename) + //{ + // (new FileIOPermission(FileIOPermissionAccess.Read, filename)).Assert(); // MDAC 62038 + // try + // { + // return FileVersionInfo.GetVersionInfo(filename); // MDAC 60411 + // } + // finally + // { + // FileIOPermission.RevertAssert(); + // } + //} //[ResourceExposure(ResourceScope.Machine)] //[ResourceConsumption(ResourceScope.Machine)] @@ -2606,55 +2601,55 @@ static internal FileVersionInfo GetVersionInfo(string filename) //} - [ResourceExposure(ResourceScope.Machine)] - [ResourceConsumption(ResourceScope.Machine)] - static internal object ClassesRootRegistryValue(string subkey, string queryvalue) - { // MDAC 77697 - (new RegistryPermission(RegistryPermissionAccess.Read, "HKEY_CLASSES_ROOT\\" + subkey)).Assert(); // MDAC 62028 - try - { - using (RegistryKey key = Registry.ClassesRoot.OpenSubKey(subkey, false)) - { - return ((null != key) ? key.GetValue(queryvalue) : null); - } - } - catch (SecurityException e) - { - // Even though we assert permission - it's possible there are - // ACL's on registry that cause SecurityException to be thrown. - ADP.TraceExceptionWithoutRethrow(e); - return null; - } - finally - { - RegistryPermission.RevertAssert(); - } - } + //[ResourceExposure(ResourceScope.Machine)] + //[ResourceConsumption(ResourceScope.Machine)] + //static internal object ClassesRootRegistryValue(string subkey, string queryvalue) + //{ // MDAC 77697 + // (new RegistryPermission(RegistryPermissionAccess.Read, "HKEY_CLASSES_ROOT\\" + subkey)).Assert(); // MDAC 62028 + // try + // { + // using (RegistryKey key = Registry.ClassesRoot.OpenSubKey(subkey, false)) + // { + // return ((null != key) ? key.GetValue(queryvalue) : null); + // } + // } + // catch (SecurityException e) + // { + // // Even though we assert permission - it's possible there are + // // ACL's on registry that cause SecurityException to be thrown. + // ADP.TraceExceptionWithoutRethrow(e); + // return null; + // } + // finally + // { + // RegistryPermission.RevertAssert(); + // } + //} - [ResourceExposure(ResourceScope.Machine)] - [ResourceConsumption(ResourceScope.Machine)] - static internal object LocalMachineRegistryValue(string subkey, string queryvalue) - { // MDAC 77697 - (new RegistryPermission(RegistryPermissionAccess.Read, "HKEY_LOCAL_MACHINE\\" + subkey)).Assert(); // MDAC 62028 - try - { - using (RegistryKey key = Registry.LocalMachine.OpenSubKey(subkey, false)) - { - return ((null != key) ? key.GetValue(queryvalue) : null); - } - } - catch (SecurityException e) - { - // Even though we assert permission - it's possible there are - // ACL's on registry that cause SecurityException to be thrown. - ADP.TraceExceptionWithoutRethrow(e); - return null; - } - finally - { - RegistryPermission.RevertAssert(); - } - } + //[ResourceExposure(ResourceScope.Machine)] + //[ResourceConsumption(ResourceScope.Machine)] + //static internal object LocalMachineRegistryValue(string subkey, string queryvalue) + //{ // MDAC 77697 + // (new RegistryPermission(RegistryPermissionAccess.Read, "HKEY_LOCAL_MACHINE\\" + subkey)).Assert(); // MDAC 62028 + // try + // { + // using (RegistryKey key = Registry.LocalMachine.OpenSubKey(subkey, false)) + // { + // return ((null != key) ? key.GetValue(queryvalue) : null); + // } + // } + // catch (SecurityException e) + // { + // // Even though we assert permission - it's possible there are + // // ACL's on registry that cause SecurityException to be thrown. + // ADP.TraceExceptionWithoutRethrow(e); + // return null; + // } + // finally + // { + // RegistryPermission.RevertAssert(); + // } + //} // SxS: although this method uses registry, it does not expose anything out //[ResourceExposure(ResourceScope.None)] @@ -2999,8 +2994,9 @@ static internal bool IsNull(object value) { return true; } - INullable nullable = (value as INullable); - return ((null != nullable) && nullable.IsNull); + + var nullable = value as INullable; + return ((nullable != null) && nullable.IsNull); } //static internal void IsNullOrSqlType(object value, out bool isNull, out bool isSqlType) diff --git a/AsyncDataAdapter/AsyncDataAdapter.csproj b/AsyncDataAdapter/AsyncDataAdapter.csproj index 5100b5e..c60c360 100644 --- a/AsyncDataAdapter/AsyncDataAdapter.csproj +++ b/AsyncDataAdapter/AsyncDataAdapter.csproj @@ -1,91 +1,39 @@ - - - - - Debug - AnyCPU - {0384745D-0E1D-4F87-A24E-2CF5762FAAB1} - Library - Properties - AsyncDataAdapter - AsyncDataAdapter - v4.5.2 - 512 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - - - AsyncDataAdapter.snk - - - - - - - - - - - - - - - - - - Component - - - - Component - - - - - - - - - Component - - - - - - - - - - - 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}. - - - - - \ No newline at end of file + + + + netstandard2.0 + true + true + AsyncDataAdapter.snk + false + + https://github.com/voloda/AsyncDataAdapter + https://github.com/voloda/AsyncDataAdapter/blob/master/LICENSE + Copyright (c) 2009-2018, Vladimir Kloz <vladimir.kloz@gmail.com> + 2.0.0 + Vladimir Kloz + + AsyncDataAdapter is implementation of SqlDataAdapter with supports async/await. + DataAdapter DbDataAdapter SqlDataAdapter + + + + ../bin + + + + ../bin + + + + + + + + + + + + + + diff --git a/AsyncDataAdapter/DataAdapter.cs b/AsyncDataAdapter/DataAdapter.cs index ee8a491..f762202 100644 --- a/AsyncDataAdapter/DataAdapter.cs +++ b/AsyncDataAdapter/DataAdapter.cs @@ -15,7 +15,6 @@ namespace AsyncDataAdapter using System; using System.ComponentModel; using System.Data; - using System.Data.ProviderBase; using System.Diagnostics; using System.Globalization; using System.Threading; @@ -331,7 +330,7 @@ public event FillErrorEventHandler FillError } [Obsolete("CloneInternals() has been deprecated. Use the DataAdapter(DataAdapter from) constructor. http://go.microsoft.com/fwlink/?linkid=14202")] // V1.1.3300, MDAC 81448 - [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] // MDAC 82936 + // [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] // MDAC 82936 virtual protected DataAdapter CloneInternals() { // V1.0.3300 DataAdapter clone = (DataAdapter)Activator.CreateInstance(GetType(), System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null); @@ -405,7 +404,7 @@ virtual protected async Task FillSchemaAsync(DataSet dataSet, Schem throw ADP.FillRequires("dataReader"); } // user must Close/Dispose of the dataReader - object value = await Task.FromResult(FillSchemaFromReaderAsync(dataSet, null, schemaType, srcTable, dataReader)); + object value = await FillSchemaFromReaderAsync(dataSet, null, schemaType, srcTable, dataReader); return (DataTable[])value; } finally diff --git a/AsyncDataAdapter/DbDataAdapter.cs b/AsyncDataAdapter/DbDataAdapter.cs index 9e1ad74..b5c33d9 100644 --- a/AsyncDataAdapter/DbDataAdapter.cs +++ b/AsyncDataAdapter/DbDataAdapter.cs @@ -17,7 +17,6 @@ namespace AsyncDataAdapter using System.Collections; using System.Collections.Generic; using System.Data; - using System.Data.ProviderBase; using System.Diagnostics; using System.Reflection; using System.Threading; diff --git a/AsyncDataAdapter/DbSchemaTable.cs b/AsyncDataAdapter/DbSchemaTable.cs index 51526b3..d68a82c 100644 --- a/AsyncDataAdapter/DbSchemaTable.cs +++ b/AsyncDataAdapter/DbSchemaTable.cs @@ -13,7 +13,6 @@ namespace AsyncDataAdapter using System; using System.Data; - using System.Data.ProviderBase; using System.Diagnostics; sealed internal class DbSchemaTable diff --git a/AsyncDataAdapter/Properties/AssemblyInfo.cs b/AsyncDataAdapter/Properties/AssemblyInfo.cs deleted file mode 100644 index b31b018..0000000 --- a/AsyncDataAdapter/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("AsyncDataAdapter")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0384745d-0e1d-4f87-a24e-2cf5762faab1")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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")] diff --git a/AsyncDataAdapter/SchemaMapping.cs b/AsyncDataAdapter/SchemaMapping.cs index b640df1..d5ee524 100644 --- a/AsyncDataAdapter/SchemaMapping.cs +++ b/AsyncDataAdapter/SchemaMapping.cs @@ -6,7 +6,6 @@ //------------------------------------------------------------------------------ using System; -using System.Data.ProviderBase; using System.Threading.Tasks; namespace AsyncDataAdapter diff --git a/AsyncDataAdapter/packages.config b/AsyncDataAdapter/packages.config deleted file mode 100644 index 5428b51..0000000 --- a/AsyncDataAdapter/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Properties.xml b/Properties.xml index b18244a..621ec51 100644 --- a/Properties.xml +++ b/Properties.xml @@ -7,6 +7,6 @@ . . nunit3-console.exe - tools\nuget.exe + nuget.exe diff --git a/appveyor.yml b/appveyor.yml index 81e774a..4170ec9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,10 @@ -version: 1.0.{build} +version: 2.0.{build} skip_tags: true image: -- Visual Studio 2015 +- Visual Studio 2017 services: - - mssql2012sp1 + - mssql2017 install: - 'ECHO Install: %APPVEYOR_PULL_REQUEST_NUMBER%,%APPVEYOR_REPO_BRANCH%,' @@ -14,11 +14,12 @@ configuration: Release build_script: - ECHO Create databases - - 'tools\nuget.exe restore AsyncDataAdapter.sln' - - 'msbuild.exe AsyncDataAdapter.msbuild /p:BuildNumber=%appveyor_build_version%.1 /t:CI' + - 'nuget.exe restore AsyncDataAdapter.sln' + - 'dotnet restore AsyncDataAdapter.sln' + - 'msbuild.exe AsyncDataAdapter.msbuild /p:BuildNumber=%appveyor_build_version% /t:CI' artifacts: - - path: .\*.nupkg + - path: .\AsyncDataAdapter\**\*.nupkg name: NugetPackages test: off