Skip to content

Commit 114bc10

Browse files
committed
Core: peripheral cleanup
1 parent ad0a262 commit 114bc10

11 files changed

+13
-34
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ NuGet.exe
1212
*.ide/
1313
*.lock.json
1414
*.coverage
15-
Test.DB.*
15+
Test.DB.*
16+
TestResults/

Dapper.sln.DotSettings

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CE/@EntryIndexedValue">CE</s:String>
33
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQ/@EntryIndexedValue">SQ</s:String>
4-
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String></wpf:ResourceDictionary>
4+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
5+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=TVP/@EntryIndexedValue">TVP</s:String></wpf:ResourceDictionary>

Dapper/CustomPropertyTypeMap.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,4 @@ public SqlMapper.IMemberMap GetMember(string columnName)
7171
return prop != null ? new SimpleMemberMap(columnName, prop) : null;
7272
}
7373
}
74-
75-
7674
}

Dapper/DbString.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,4 @@ public void AddParameter(IDbCommand command, string name)
7474
command.Parameters.Add(param);
7575
}
7676
}
77-
7877
}

Dapper/DynamicParameters.CachedOutputSetters.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
1+
using System.Collections;
42

53
namespace Dapper
64
{

Dapper/DynamicParameters.ParamInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ sealed class ParamInfo
2323
public byte? Precision { get; set; }
2424
public byte? Scale { get; set; }
2525
}
26-
2726
}
2827
}

Dapper/DynamicParameters.cs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void AddDynamicParams(object param)
108108
/// </summary>
109109
public void Add(string name, object value, DbType? dbType, ParameterDirection? direction, int? size)
110110
{
111-
parameters[Clean(name)] = new ParamInfo()
111+
parameters[Clean(name)] = new ParamInfo
112112
{
113113
Name = name,
114114
Value = value,
@@ -125,7 +125,7 @@ public void Add(
125125
string name, object value = null, DbType? dbType = null, ParameterDirection? direction = null, int? size = null, byte? precision = null, byte? scale = null
126126
)
127127
{
128-
parameters[Clean(name)] = new ParamInfo()
128+
parameters[Clean(name)] = new ParamInfo
129129
{
130130
Name = name,
131131
Value = value,
@@ -300,13 +300,7 @@ protected void AddParameters(IDbCommand command, SqlMapper.Identity identity)
300300
/// <summary>
301301
/// All the names of the param in the bag, use Get to yank them out
302302
/// </summary>
303-
public IEnumerable<string> ParameterNames
304-
{
305-
get
306-
{
307-
return parameters.Select(p => p.Key);
308-
}
309-
}
303+
public IEnumerable<string> ParameterNames => parameters.Select(p => p.Key);
310304

311305

312306
/// <summary>
@@ -490,11 +484,7 @@ public DynamicParameters Output<T>(T target, Expression<Func<T, object>> express
490484
}
491485

492486
private List<Action> outputCallbacks;
493-
494-
private readonly Dictionary<string, Action<object, DynamicParameters>> cachedOutputSetters = new Dictionary<string, Action<object, DynamicParameters>>();
495-
496-
497-
487+
498488
void SqlMapper.IParameterCallbacks.OnCompleted()
499489
{
500490
foreach (var param in (from p in parameters select p.Value))
@@ -503,6 +493,4 @@ void SqlMapper.IParameterCallbacks.OnCompleted()
503493
}
504494
}
505495
}
506-
507-
508496
}

Dapper/ExplicitConstructorAttribute.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ namespace Dapper
88
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false)]
99
public sealed class ExplicitConstructorAttribute : Attribute
1010
{
11-
1211
}
1312
}

Dapper/FeatureSupport.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ namespace Dapper
1212
class FeatureSupport
1313
{
1414
private static readonly FeatureSupport
15-
@default = new FeatureSupport(false),
16-
postgres = new FeatureSupport(true);
15+
Default = new FeatureSupport(false),
16+
Postgres = new FeatureSupport(true);
1717

1818
/// <summary>
1919
/// Gets the feature set based on the passed connection
2020
/// </summary>
2121
public static FeatureSupport Get(IDbConnection connection)
2222
{
2323
string name = connection?.GetType().Name;
24-
if (string.Equals(name, "npgsqlconnection", StringComparison.OrdinalIgnoreCase)) return postgres;
25-
return @default;
24+
if (string.Equals(name, "npgsqlconnection", StringComparison.OrdinalIgnoreCase)) return Postgres;
25+
return Default;
2626
}
2727
private FeatureSupport(bool arrays)
2828
{
@@ -33,5 +33,4 @@ private FeatureSupport(bool arrays)
3333
/// </summary>
3434
public bool Arrays { get; }
3535
}
36-
3736
}

Dapper/SimpleMemberMap.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,4 @@ public SimpleMemberMap(string columnName, ParameterInfo parameter)
8484
/// </summary>
8585
public ParameterInfo Parameter { get; }
8686
}
87-
8887
}

Dapper/SqlDataRecordListTVPParameter.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#if !COREFX
66
namespace Dapper
77
{
8-
98
/// <summary>
109
/// Used to pass a IEnumerable&lt;SqlDataRecord&gt; as a SqlDataRecordListTVPParameter
1110
/// </summary>
@@ -49,6 +48,5 @@ internal static void Set(IDbDataParameter parameter, IEnumerable<Microsoft.SqlSe
4948
}
5049
}
5150
}
52-
5351
}
5452
#endif

0 commit comments

Comments
 (0)