Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dapper
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
Dapper
Commits
23547c9d
Commit
23547c9d
authored
Nov 14, 2015
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNXCORE50: Clean up usings and some missing C#6 conversions
parent
e8dc7878
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
93 additions
and
340 deletions
+93
-340
Assert.cs
Dapper.DNX.Tests/Assert.cs
+2
-3
Program.cs
Dapper.DNX.Tests/Program.cs
+4
-2
Tests.cs
Dapper.DNX.Tests/Tests.cs
+6
-7
CommandDefinition.cs
Dapper/CommandDefinition.cs
+3
-10
DbString.cs
Dapper/DbString.cs
+1
-10
DynamicParameters.CachedOutputSetters.cs
Dapper/DynamicParameters.CachedOutputSetters.cs
+1
-12
DynamicParameters.ParamInfo.cs
Dapper/DynamicParameters.ParamInfo.cs
+2
-10
DynamicParameters.cs
Dapper/DynamicParameters.cs
+3
-11
FeatureSupport.cs
Dapper/FeatureSupport.cs
+2
-10
SqlMapper.Async.cs
Dapper/SqlMapper.Async.cs
+4
-10
SqlMapper.CacheInfo.cs
Dapper/SqlMapper.CacheInfo.cs
+2
-10
SqlMapper.DeserializerState.cs
Dapper/SqlMapper.DeserializerState.cs
+1
-10
SqlMapper.GridReader.cs
Dapper/SqlMapper.GridReader.cs
+2
-10
SqlMapper.ICustomQueryParameter.cs
Dapper/SqlMapper.ICustomQueryParameter.cs
+2
-10
SqlMapper.IDynamicParameters.cs
Dapper/SqlMapper.IDynamicParameters.cs
+1
-10
SqlMapper.ITypeHandler.cs
Dapper/SqlMapper.ITypeHandler.cs
+2
-10
SqlMapper.Identity.cs
Dapper/SqlMapper.Identity.cs
+1
-10
SqlMapper.TypeHandler.cs
Dapper/SqlMapper.TypeHandler.cs
+3
-10
SqlMapper.TypeHandlerCache.cs
Dapper/SqlMapper.TypeHandlerCache.cs
+3
-10
SqlMapper.cs
Dapper/SqlMapper.cs
+9
-12
TypeExtensions.cs
Dapper/TypeExtensions.cs
+1
-12
WrappedDataReader.cs
Dapper/WrappedDataReader.cs
+2
-10
WrappedReader.cs
Dapper/WrappedReader.cs
+36
-131
No files found.
Dapper.DNX.Tests/Assert.cs
View file @
23547c9d
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#if DNXCORE50
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
...
...
@@ -16,7 +15,7 @@ public static void IsEqualTo<T>(this T obj, T other)
{
if
(!
Equals
(
obj
,
other
))
{
throw
new
ApplicationException
(
string
.
Format
(
"{0} should be equals to {1}"
,
obj
,
other
)
);
throw
new
ApplicationException
(
$"
{
obj
}
should be equals to
{
other
}
"
);
}
}
...
...
@@ -24,7 +23,7 @@ public static void IsSequenceEqualTo<T>(this IEnumerable<T> obj, IEnumerable<T>
{
if
(!(
obj
??
new
T
[
0
]).
SequenceEqual
(
other
??
new
T
[
0
]))
{
throw
new
ApplicationException
(
string
.
Format
(
"{0} should be equals to {1}"
,
obj
,
other
)
);
throw
new
ApplicationException
(
$"
{
obj
}
should be equals to
{
other
}
"
);
}
}
...
...
Dapper.DNX.Tests/Program.cs
View file @
23547c9d
...
...
@@ -42,8 +42,10 @@ public static SqlConnection GetOpenConnection(bool mars = false)
var
cs
=
ConnectionString
;
if
(
mars
)
{
SqlConnectionStringBuilder
scsb
=
new
SqlConnectionStringBuilder
(
cs
);
scsb
.
MultipleActiveResultSets
=
true
;
var
scsb
=
new
SqlConnectionStringBuilder
(
cs
)
{
MultipleActiveResultSets
=
true
};
cs
=
scsb
.
ConnectionString
;
}
var
connection
=
new
SqlConnection
(
cs
);
...
...
Dapper.DNX.Tests/Tests.cs
View file @
23547c9d
//#define POSTGRESQL // uncomment to run postgres tests
#if DNXCORE50
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
using
IDbDataParameter
=
System
.
Data
.
Common
.
DbParameter
;
using
IDbConnection
=
System
.
Data
.
Common
.
DbConnection
;
using
IDbTransaction
=
System
.
Data
.
Common
.
DbTransaction
;
using
IDataReader
=
System
.
Data
.
Common
.
DbDataReader
;
#endif
using
System
;
...
...
@@ -24,7 +24,6 @@
using
System.Threading
;
using
System.Data.SqlTypes
;
using
System.Diagnostics
;
#if EXTERNALS
using
FirebirdSql.Data.FirebirdClient
;
using
System.Data.Entity.Spatial
;
...
...
@@ -78,7 +77,7 @@ public abstract class Order
protected
int
Protected
{
get
;
set
;
}
public
int
Public
{
get
;
set
;
}
public
int
ProtectedVal
{
get
{
return
Protected
;
}
}
public
int
ProtectedVal
=>
Protected
;
}
public
class
ConcreteOrder
:
Order
...
...
Dapper/CommandDefinition.cs
View file @
23547c9d
...
...
@@ -5,16 +5,9 @@
using
System.Threading
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbTransaction
=
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
#endif
namespace
Dapper
...
...
Dapper/DbString.cs
View file @
23547c9d
...
...
@@ -2,16 +2,7 @@
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
#endif
namespace
Dapper
...
...
Dapper/DynamicParameters.CachedOutputSetters.cs
View file @
23547c9d
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
#endif
namespace
Dapper
{
partial
class
DynamicParameters
...
...
Dapper/DynamicParameters.ParamInfo.cs
View file @
23547c9d
using
System
;
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbDataParameter
=
System
.
Data
.
Common
.
DbParameter
;
#endif
namespace
Dapper
{
...
...
Dapper/DynamicParameters.cs
View file @
23547c9d
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Data
;
using
System.Linq
;
...
...
@@ -8,16 +7,9 @@
using
System.Reflection.Emit
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbDataParameter
=
System
.
Data
.
Common
.
DbParameter
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
using
ApplicationException
=
System
.
InvalidOperationException
;
#endif
namespace
Dapper
...
...
Dapper/FeatureSupport.cs
View file @
23547c9d
using
System
;
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbConnection
=
System
.
Data
.
Common
.
DbConnection
;
#endif
namespace
Dapper
{
...
...
Dapper/SqlMapper.Async.cs
View file @
23547c9d
...
...
@@ -10,16 +10,10 @@
using
System.Threading.Tasks
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbTransaction
=
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
System
.
Data
.
Common
.
DbDataReader
;
#endif
namespace
Dapper
...
...
Dapper/SqlMapper.CacheInfo.cs
View file @
23547c9d
...
...
@@ -3,16 +3,8 @@
using
System.Threading
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
System
.
Data
.
Common
.
DbDataReader
;
#endif
namespace
Dapper
...
...
Dapper/SqlMapper.DeserializerState.cs
View file @
23547c9d
...
...
@@ -2,16 +2,7 @@
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDataReader
=
System
.
Data
.
Common
.
DbDataReader
;
#endif
namespace
Dapper
...
...
Dapper/SqlMapper.GridReader.cs
View file @
23547c9d
...
...
@@ -4,16 +4,8 @@
using
System.Linq
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
System
.
Data
.
Common
.
DbDataReader
;
#endif
namespace
Dapper
...
...
Dapper/SqlMapper.ICustomQueryParameter.cs
View file @
23547c9d
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
#endif
namespace
Dapper
{
...
...
Dapper/SqlMapper.IDynamicParameters.cs
View file @
23547c9d
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
#endif
namespace
Dapper
...
...
Dapper/SqlMapper.ITypeHandler.cs
View file @
23547c9d
using
System
;
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbDataParameter
=
System
.
Data
.
Common
.
DbParameter
;
#endif
namespace
Dapper
{
...
...
Dapper/SqlMapper.Identity.cs
View file @
23547c9d
...
...
@@ -2,16 +2,7 @@
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbConnection
=
System
.
Data
.
Common
.
DbConnection
;
#endif
namespace
Dapper
...
...
Dapper/SqlMapper.TypeHandler.cs
View file @
23547c9d
...
...
@@ -3,18 +3,11 @@
using
System.Data
;
using
System.Linq
;
using
System.Text
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbDataParameter
=
System
.
Data
.
Common
.
DbParameter
;
#endif
namespace
Dapper
{
partial
class
SqlMapper
...
...
Dapper/SqlMapper.TypeHandlerCache.cs
View file @
23547c9d
using
System
;
using
System.ComponentModel
;
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbDataParameter
=
System
.
Data
.
Common
.
DbParameter
;
#endif
namespace
Dapper
{
partial
class
SqlMapper
...
...
Dapper/SqlMapper.cs
View file @
23547c9d
...
...
@@ -4,16 +4,15 @@
*/
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbDataParameter
=
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
System
.
InvalidOperationException
;
#endif
using
System
;
...
...
@@ -37,8 +36,6 @@ namespace Dapper
/// </summary>
public
static
partial
class
SqlMapper
{
static
int
GetColumnHash
(
IDataReader
reader
)
{
unchecked
...
...
Dapper/TypeExtensions.cs
View file @
23547c9d
using
System
;
using
System.Reflection
;
using
System.Collections.Generic
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
#endif
namespace
Dapper
{
internal
static
class
TypeExtensions
...
...
Dapper/WrappedDataReader.cs
View file @
23547c9d
using
System.Data
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
System
.
Data
.
Common
.
DbDataReader
;
#endif
namespace
Dapper
...
...
Dapper/WrappedReader.cs
View file @
23547c9d
using
System
;
using
System.Data
;
using
System.Collections
;
#if DNXCORE50
using
IDbDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDataParameter
=
global
::
System
.
Data
.
Common
.
DbParameter
;
using
IDbTransaction
=
global
::
System
.
Data
.
Common
.
DbTransaction
;
using
IDbConnection
=
global
::
System
.
Data
.
Common
.
DbConnection
;
using
IDbCommand
=
global
::
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataRecord
=
global
::
System
.
Data
.
Common
.
DbDataReader
;
using
IDataParameterCollection
=
global
::
System
.
Data
.
Common
.
DbParameterCollection
;
using
DataException
=
global
::
System
.
InvalidOperationException
;
using
ApplicationException
=
global
::
System
.
InvalidOperationException
;
using
IDbCommand
=
System
.
Data
.
Common
.
DbCommand
;
using
IDataReader
=
System
.
Data
.
Common
.
DbDataReader
;
#endif
namespace
Dapper
...
...
@@ -50,174 +43,86 @@ public override IDbCommand Command
}
}
public
override
int
Depth
{
get
{
return
Reader
.
Depth
;
}
}
public
override
int
Depth
=>
Reader
.
Depth
;
public
override
bool
IsClosed
{
get
{
return
reader
==
null
?
true
:
reader
.
IsClosed
;
}
}
public
override
bool
HasRows
{
get
{
return
Reader
.
HasRows
;
}
}
public
override
bool
NextResult
()
{
return
Reader
.
NextResult
();
}
public
override
bool
IsClosed
=>
reader
?.
IsClosed
??
true
;
public
override
bool
Read
()
{
return
Reader
.
Read
();
}
public
override
bool
HasRows
=>
Reader
.
HasRows
;
public
override
int
RecordsAffected
{
get
{
return
Reader
.
RecordsAffected
;
}
}
public
override
bool
NextResult
()
=>
Reader
.
NextResult
();
public
override
bool
Read
()
=>
Reader
.
Read
();
public
override
int
RecordsAffected
=>
Reader
.
RecordsAffected
;
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
)
{
if
(
reader
!=
null
)
reader
.
Dispose
();
reader
?
.
Dispose
();
reader
=
null
;
if
(
cmd
!=
null
)
cmd
.
Dispose
();
cmd
?
.
Dispose
();
cmd
=
null
;
}
base
.
Dispose
(
disposing
);
}
public
override
int
FieldCount
{
get
{
return
Reader
.
FieldCount
;
}
}
public
override
int
FieldCount
=>
Reader
.
FieldCount
;
public
override
bool
GetBoolean
(
int
i
)
{
return
Reader
.
GetBoolean
(
i
);
}
public
override
bool
GetBoolean
(
int
i
)
=>
Reader
.
GetBoolean
(
i
);
public
override
byte
GetByte
(
int
i
)
{
return
Reader
.
GetByte
(
i
);
}
public
override
byte
GetByte
(
int
i
)
=>
Reader
.
GetByte
(
i
);
public
override
long
GetBytes
(
int
i
,
long
fieldOffset
,
byte
[]
buffer
,
int
bufferoffset
,
int
length
)
{
return
Reader
.
GetBytes
(
i
,
fieldOffset
,
buffer
,
bufferoffset
,
length
);
}
public
override
char
GetChar
(
int
i
)
{
return
Reader
.
GetChar
(
i
);
}
public
override
char
GetChar
(
int
i
)
=>
Reader
.
GetChar
(
i
);
public
override
long
GetChars
(
int
i
,
long
fieldoffset
,
char
[]
buffer
,
int
bufferoffset
,
int
length
)
{
return
Reader
.
GetChars
(
i
,
fieldoffset
,
buffer
,
bufferoffset
,
length
);
}
protected
override
IDataReader
GetDbDataReader
(
int
ordinal
)
{
return
Reader
.
GetData
(
ordinal
);
}
protected
override
IDataReader
GetDbDataReader
(
int
ordinal
)
=>
Reader
.
GetData
(
ordinal
);
public
override
string
GetDataTypeName
(
int
i
)
{
return
Reader
.
GetDataTypeName
(
i
);
}
public
override
string
GetDataTypeName
(
int
i
)
=>
Reader
.
GetDataTypeName
(
i
);
public
override
DateTime
GetDateTime
(
int
i
)
{
return
Reader
.
GetDateTime
(
i
);
}
public
override
DateTime
GetDateTime
(
int
i
)
=>
Reader
.
GetDateTime
(
i
);
public
override
decimal
GetDecimal
(
int
i
)
{
return
Reader
.
GetDecimal
(
i
);
}
public
override
decimal
GetDecimal
(
int
i
)
=>
Reader
.
GetDecimal
(
i
);
public
override
double
GetDouble
(
int
i
)
{
return
Reader
.
GetDouble
(
i
);
}
public
override
double
GetDouble
(
int
i
)
=>
Reader
.
GetDouble
(
i
);
public
override
Type
GetFieldType
(
int
i
)
{
return
Reader
.
GetFieldType
(
i
);
}
public
override
Type
GetFieldType
(
int
i
)
=>
Reader
.
GetFieldType
(
i
);
public
override
float
GetFloat
(
int
i
)
{
return
Reader
.
GetFloat
(
i
);
}
public
override
float
GetFloat
(
int
i
)
=>
Reader
.
GetFloat
(
i
);
public
override
Guid
GetGuid
(
int
i
)
{
return
Reader
.
GetGuid
(
i
);
}
public
override
Guid
GetGuid
(
int
i
)
=>
Reader
.
GetGuid
(
i
);
public
override
short
GetInt16
(
int
i
)
{
return
Reader
.
GetInt16
(
i
);
}
public
override
short
GetInt16
(
int
i
)
=>
Reader
.
GetInt16
(
i
);
public
override
int
GetInt32
(
int
i
)
{
return
Reader
.
GetInt32
(
i
);
}
public
override
int
GetInt32
(
int
i
)
=>
Reader
.
GetInt32
(
i
);
public
override
long
GetInt64
(
int
i
)
{
return
Reader
.
GetInt64
(
i
);
}
public
override
long
GetInt64
(
int
i
)
=>
Reader
.
GetInt64
(
i
);
public
override
string
GetName
(
int
i
)
{
return
Reader
.
GetName
(
i
);
}
public
override
string
GetName
(
int
i
)
=>
Reader
.
GetName
(
i
);
public
override
int
GetOrdinal
(
string
name
)
{
return
Reader
.
GetOrdinal
(
name
);
}
public
override
int
GetOrdinal
(
string
name
)
=>
Reader
.
GetOrdinal
(
name
);
public
override
string
GetString
(
int
i
)
{
return
Reader
.
GetString
(
i
);
}
public
override
string
GetString
(
int
i
)
=>
Reader
.
GetString
(
i
);
public
override
object
GetValue
(
int
i
)
{
return
Reader
.
GetValue
(
i
);
}
public
override
object
GetValue
(
int
i
)
=>
Reader
.
GetValue
(
i
);
public
override
int
GetValues
(
object
[]
values
)
{
return
Reader
.
GetValues
(
values
);
}
public
override
int
GetValues
(
object
[]
values
)
=>
Reader
.
GetValues
(
values
);
public
override
bool
IsDBNull
(
int
i
)
{
return
Reader
.
IsDBNull
(
i
);
}
public
override
bool
IsDBNull
(
int
i
)
=>
Reader
.
IsDBNull
(
i
);
public
override
object
this
[
string
name
]
{
get
{
return
Reader
[
name
];
}
}
public
override
object
this
[
string
name
]
=>
Reader
[
name
];
public
override
object
this
[
int
i
]
{
get
{
return
Reader
[
i
];
}
}
public
override
object
this
[
int
i
]
=>
Reader
[
i
];
}
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment