Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Dapper
提交
4d75b982
D
Dapper
项目概览
int
/
Dapper
11 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dapper
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4d75b982
编写于
5月 08, 2017
作者:
N
Nick Craver
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tests: make analyzers happy because why not
上级
b5b65e60
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
20 addition
and
12 deletion
+20
-12
Dapper.Tests.Contrib/TestSuite.cs
Dapper.Tests.Contrib/TestSuite.cs
+1
-1
Dapper.Tests.Performance/Massive/Massive.cs
Dapper.Tests.Performance/Massive/Massive.cs
+4
-0
Dapper.Tests.Performance/PerformanceTests.cs
Dapper.Tests.Performance/PerformanceTests.cs
+2
-2
Dapper.Tests.Performance/PetaPoco/PetaPoco.cs
Dapper.Tests.Performance/PetaPoco/PetaPoco.cs
+5
-3
Dapper.Tests.Performance/Soma/SomaConfig.cs
Dapper.Tests.Performance/Soma/SomaConfig.cs
+1
-1
Dapper.Tests/AsyncTests.cs
Dapper.Tests/AsyncTests.cs
+1
-1
Dapper.Tests/ConstructorTests.cs
Dapper.Tests/ConstructorTests.cs
+1
-1
Dapper.Tests/MiscTests.cs
Dapper.Tests/MiscTests.cs
+2
-0
Dapper.Tests/Providers/MySQLTests.cs
Dapper.Tests/Providers/MySQLTests.cs
+1
-1
Dapper.Tests/Providers/PostgresqlTests.cs
Dapper.Tests/Providers/PostgresqlTests.cs
+1
-1
Dapper.Tests/TypeHandlerTests.cs
Dapper.Tests/TypeHandlerTests.cs
+1
-1
未找到文件。
Dapper.Tests.Contrib/TestSuite.cs
浏览文件 @
4d75b982
...
...
@@ -469,7 +469,7 @@ public void InsertWithCustomTableNameMapper()
var
name
=
type
.
Name
+
"s"
;
if
(
type
.
IsInterface
()
&&
name
.
StartsWith
(
"I"
))
name
=
name
.
Substring
(
1
);
return
name
.
Substring
(
1
);
return
name
;
}
};
...
...
Dapper.Tests.Performance/Massive/Massive.cs
浏览文件 @
4d75b982
...
...
@@ -8,6 +8,7 @@
using
System.Linq
;
using
System.Text
;
#pragma warning disable RCS1141 // Add parameter to documentation comment.
namespace
Massive
{
public
static
class
ObjectExtensions
...
...
@@ -115,7 +116,9 @@ public class DynamicModel
{
private
readonly
DbProviderFactory
_factory
;
#pragma warning disable 0649
#pragma warning disable RCS1169 // Mark field as read-only.
private
string
_connectionString
;
#pragma warning restore RCS1169 // Mark field as read-only.
#pragma warning restore 0649
public
DynamicModel
(
string
connectionStringName
=
""
,
string
tableName
=
""
,
string
primaryKeyField
=
""
)
...
...
@@ -450,4 +453,5 @@ public virtual dynamic Single(object key, string columns = "*")
}
}
}
#pragma warning restore RCS1141 // Add parameter to documentation comment.
#
endif
\ No newline at end of file
Dapper.Tests.Performance/PerformanceTests.cs
浏览文件 @
4d75b982
...
...
@@ -51,7 +51,7 @@ public void Add(Action<int> iteration, string name)
Add
(
new
Test
(
iteration
,
name
));
}
public
void
A
ddAsync
(
Func
<
int
,
Task
>
iterationAsync
,
string
name
)
public
void
A
syncAdd
(
Func
<
int
,
Task
>
iterationAsync
,
string
name
)
{
Add
(
new
Test
(
iterationAsync
,
name
));
}
...
...
@@ -230,7 +230,7 @@ public async Task RunAsync(int iterations)
Try
(()
=>
{
var
query
=
new
Belgrade
.
SqlClient
.
SqlDb
.
QueryMapper
(
ConnectionString
);
tests
.
A
ddAsync
(
id
=>
query
.
ExecuteReader
(
"SELECT TOP 1 * FROM Posts WHERE Id = "
+
id
,
tests
.
A
syncAdd
(
id
=>
query
.
ExecuteReader
(
"SELECT TOP 1 * FROM Posts WHERE Id = "
+
id
,
reader
=>
{
var
post
=
new
Post
();
...
...
Dapper.Tests.Performance/PetaPoco/PetaPoco.cs
浏览文件 @
4d75b982
...
...
@@ -10,6 +10,7 @@
using
System.Reflection
;
using
System.Reflection.Emit
;
#pragma warning disable RCS1023 // Format empty block.
namespace
PetaPoco
{
// Poco's marked [Explicit] require all column properties to be marked
...
...
@@ -37,8 +38,8 @@ public class Column : Attribute
public
class
ResultColumn
:
Column
{
public
ResultColumn
()
{
}
public
ResultColumn
(
string
name
)
:
base
(
name
)
{
}
}
public
ResultColumn
(
string
name
)
:
base
(
name
)
{
}
}
// Specify the table name of a poco
[
AttributeUsage
(
AttributeTargets
.
Class
)]
...
...
@@ -1287,7 +1288,7 @@ public void Dispose()
_db
.
CloseSharedConnection
();
}
}
// Member variables
private
readonly
string
_connectionString
;
private
readonly
string
_providerName
;
...
...
@@ -1441,4 +1442,5 @@ public void Build(StringBuilder sb, List<object> args, Sql lhs)
}
}
}
#pragma warning restore RCS1023 // Format empty block.
#
endif
\ No newline at end of file
Dapper.Tests.Performance/Soma/SomaConfig.cs
浏览文件 @
4d75b982
...
...
@@ -9,6 +9,6 @@ internal class SomaConfig : MsSqlConfig
public
override
Action
<
PreparedStatement
>
Logger
=>
noOp
;
private
static
readonly
Action
<
PreparedStatement
>
noOp
=
x
=>
{
};
private
static
readonly
Action
<
PreparedStatement
>
noOp
=
x
=>
{
/* nope */
};
}
}
Dapper.Tests/AsyncTests.cs
浏览文件 @
4d75b982
...
...
@@ -791,7 +791,7 @@ public async Task Issue563_QueryAsyncShouldThrowException()
var
data
=
(
await
connection
.
QueryAsync
<
int
>(
"select 1 union all select 2; RAISERROR('after select', 16, 1);"
).
ConfigureAwait
(
false
)).
ToList
();
Assert
.
Fail
();
}
catch
(
SqlException
ex
)
when
(
ex
.
Message
==
"after select"
)
{
}
catch
(
SqlException
ex
)
when
(
ex
.
Message
==
"after select"
)
{
/* swallow only this */
}
}
}
}
\ No newline at end of file
Dapper.Tests/ConstructorTests.cs
浏览文件 @
4d75b982
...
...
@@ -90,7 +90,7 @@ private class _ExplicitConstructors
private
readonly
bool
WentThroughProperConstructor
;
public
_ExplicitConstructors
()
{
}
public
_ExplicitConstructors
()
{
/* yep */
}
[
ExplicitConstructor
]
public
_ExplicitConstructors
(
string
foo
,
int
bar
)
...
...
Dapper.Tests/MiscTests.cs
浏览文件 @
4d75b982
...
...
@@ -471,7 +471,9 @@ private class TestFieldCaseAndPrivatesEntity
private
int
b
{
get
;
set
;
}
public
int
GetB
()
{
return
b
;
}
public
int
c
=
0
;
#pragma warning disable RCS1169 // Mark field as read-only.
private
int
d
=
0
;
#pragma warning restore RCS1169 // Mark field as read-only.
public
int
GetD
()
{
return
d
;
}
public
int
e
{
get
;
set
;
}
private
string
f
...
...
Dapper.Tests/Providers/MySQLTests.cs
浏览文件 @
4d75b982
...
...
@@ -176,7 +176,7 @@ static FactMySqlAttribute()
{
try
{
using
(
GetMySqlConnection
(
true
))
{
}
using
(
GetMySqlConnection
(
true
))
{
/* just trying to see if it works */
}
}
catch
(
Exception
ex
)
{
...
...
Dapper.Tests/Providers/PostgresqlTests.cs
浏览文件 @
4d75b982
...
...
@@ -71,7 +71,7 @@ static FactPostgresqlAttribute()
{
try
{
using
(
GetOpenNpgsqlConnection
())
{
}
using
(
GetOpenNpgsqlConnection
())
{
/* just trying to see if it works */
}
}
catch
(
Exception
ex
)
{
...
...
Dapper.Tests/TypeHandlerTests.cs
浏览文件 @
4d75b982
...
...
@@ -69,7 +69,7 @@ public void Issue136_ValueTypeHandlers()
public
class
LocalDateHandler
:
SqlMapper
.
TypeHandler
<
LocalDate
>
{
private
LocalDateHandler
()
{
}
private
LocalDateHandler
()
{
/* private constructor */
}
// Make the field type ITypeHandler to ensure it cannot be used with SqlMapper.AddTypeHandler<T>(TypeHandler<T>)
// by mistake.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录