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
db05dc42
Commit
db05dc42
authored
May 02, 2011
by
simon.cropp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove an unuse param, remove elses through direct returns
parent
8d0eb4de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
SqlMapper.cs
Dapper/SqlMapper.cs
+3
-10
No files found.
Dapper/SqlMapper.cs
View file @
db05dc42
...
@@ -395,24 +395,17 @@ private static CacheInfo GetCacheInfo(object param, Identity identity)
...
@@ -395,24 +395,17 @@ private static CacheInfo GetCacheInfo(object param, Identity identity)
private
static
Func
<
IDataReader
,
T
>
GetDeserializer
<
T
>(
Identity
identity
,
IDataReader
reader
,
int
startBound
=
0
,
int
length
=
-
1
,
bool
returnNullIfFirstMissing
=
false
)
private
static
Func
<
IDataReader
,
T
>
GetDeserializer
<
T
>(
Identity
identity
,
IDataReader
reader
,
int
startBound
=
0
,
int
length
=
-
1
,
bool
returnNullIfFirstMissing
=
false
)
{
{
object
oDeserializer
;
// dynamic is passed in as Object ... by c# design
// dynamic is passed in as Object ... by c# design
if
(
typeof
(
T
)
==
typeof
(
object
)
||
typeof
(
T
)
==
typeof
(
ExpandoObject
))
if
(
typeof
(
T
)
==
typeof
(
object
)
||
typeof
(
T
)
==
typeof
(
ExpandoObject
))
{
{
return
GetDynamicDeserializer
<
T
>(
reader
,
startBound
,
length
,
returnNullIfFirstMissing
);
return
GetDynamicDeserializer
<
T
>(
reader
,
startBound
,
length
,
returnNullIfFirstMissing
);
}
}
else
if
(
typeof
(
T
).
IsClass
&&
typeof
(
T
)
!=
typeof
(
string
))
if
(
typeof
(
T
).
IsClass
&&
typeof
(
T
)
!=
typeof
(
string
))
{
{
return
GetClassDeserializer
<
T
>(
reader
,
startBound
,
length
,
returnNullIfFirstMissing
:
returnNullIfFirstMissing
);
return
GetClassDeserializer
<
T
>(
reader
,
startBound
,
length
,
returnNullIfFirstMissing
:
returnNullIfFirstMissing
);
}
}
else
return
GetStructDeserializer
<
T
>();
{
return
GetStructDeserializer
<
T
>(
reader
);
}
var
deserializer
=
(
Func
<
IDataReader
,
T
>)
oDeserializer
;
return
deserializer
;
}
}
private
static
Func
<
IDataReader
,
T
>
GetDynamicDeserializer
<
T
>(
IDataRecord
reader
,
int
startBound
=
0
,
int
length
=
-
1
,
bool
returnNullIfFirstMissing
=
false
)
private
static
Func
<
IDataReader
,
T
>
GetDynamicDeserializer
<
T
>(
IDataRecord
reader
,
int
startBound
=
0
,
int
length
=
-
1
,
bool
returnNullIfFirstMissing
=
false
)
...
@@ -647,7 +640,7 @@ private static int ExecuteCommand(IDbConnection cnn, IDbTransaction tranaction,
...
@@ -647,7 +640,7 @@ private static int ExecuteCommand(IDbConnection cnn, IDbTransaction tranaction,
}
}
}
}
private
static
Func
<
IDataReader
,
T
>
GetStructDeserializer
<
T
>(
IDataReader
reader
)
private
static
Func
<
IDataReader
,
T
>
GetStructDeserializer
<
T
>()
{
{
return
r
=>
return
r
=>
{
{
...
...
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