Skip to content

Commit e59da52

Browse files
committed
Minor cleanup all around
With Rider solution-wide analysis
1 parent d4e73b4 commit e59da52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+212
-251
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
3737
csharp_style_inlined_variable_declaration = true:suggestion
3838
csharp_style_throw_expression = true:suggestion
3939
csharp_style_conditional_delegate_call = true:suggestion
40+
csharp_indent_case_contents_when_block = false

Npgsql.sln.DotSettings

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArgumentsStyleStringLiteral/@EntryIndexedValue">DO_NOT_SHOW</s:String>
77
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBePrivate_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
88
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBeProtected_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
9+
<s:String x:Key="/Default/CodeInspection/Highlighting/UsageCheckingInspectionLevel/@EntryValue">InternalsOnly</s:String>
910
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/ARGUMENTS_LITERAL/@EntryValue">Positional</s:String>
1011
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/ARGUMENTS_NAMED/@EntryValue">Positional</s:String>
1112
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_INTERNAL_MODIFIER/@EntryValue">Implicit</s:String>
@@ -14,8 +15,10 @@
1415
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
1516
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
1617
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean>
18+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CRS/@EntryIndexedValue">CRS</s:String>
1719
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GIS/@EntryIndexedValue">GIS</s:String>
1820
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GSS/@EntryIndexedValue">GSS</s:String>
21+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HMAC/@EntryIndexedValue">HMAC</s:String>
1922
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MD/@EntryIndexedValue">MD</s:String>
2023
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=OID/@EntryIndexedValue">OID</s:String>
2124
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SASL/@EntryIndexedValue">SASL</s:String>
@@ -88,6 +91,7 @@
8891
<s:Boolean x:Key="/Default/UserDictionary/Words/=Npgsql/@EntryIndexedValue">True</s:Boolean>
8992
<s:Boolean x:Key="/Default/UserDictionary/Words/=Npgsql_0027s/@EntryIndexedValue">True</s:Boolean>
9093
<s:Boolean x:Key="/Default/UserDictionary/Words/=PGTZ/@EntryIndexedValue">True</s:Boolean>
94+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Postgis/@EntryIndexedValue">True</s:Boolean>
9195
<s:Boolean x:Key="/Default/UserDictionary/Words/=Postgre/@EntryIndexedValue">True</s:Boolean>
9296
<s:Boolean x:Key="/Default/UserDictionary/Words/=Pregenerated/@EntryIndexedValue">True</s:Boolean>
9397
<s:Boolean x:Key="/Default/UserDictionary/Words/=P_0020keepaliv/@EntryIndexedValue">True</s:Boolean>

src/Npgsql.GeoJSON/NpgsqlGeoJSONExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Npgsql.TypeMapping;
77
using NpgsqlTypes;
88

9+
// ReSharper disable once CheckNamespace
910
namespace Npgsql
1011
{
1112
/// <summary>

src/Npgsql.Json.NET/JsonHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public override NpgsqlTypeHandler<string> Create(PostgresType postgresType, Npgs
2020
=> new JsonHandler(postgresType, conn, _settings);
2121
}
2222

23-
class JsonHandler : Npgsql.TypeHandlers.TextHandler
23+
class JsonHandler : TypeHandlers.TextHandler
2424
{
2525
readonly JsonSerializerSettings _settings;
2626

src/Npgsql.Json.NET/JsonbHandler.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
using System.Linq;
3-
using System.Text.Json;
42
using System.Threading.Tasks;
53
using Newtonsoft.Json;
64
using Npgsql.BackendMessages;

src/Npgsql.NetTopologySuite/NetTopologySuiteHandler.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,30 +135,30 @@ public override void Write(byte[] buffer, int offset, int count)
135135
#region Write
136136

137137
public override Task Write(Geometry value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
138-
=> WriteCore(value, buf, lengthCache, parameter, async);
138+
=> WriteCore(value, buf);
139139

140140
Task INpgsqlTypeHandler<Point>.Write(Point value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
141-
=> WriteCore(value, buf, lengthCache, parameter, async);
141+
=> WriteCore(value, buf);
142142

143143
Task INpgsqlTypeHandler<LineString>.Write(LineString value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
144-
=> WriteCore(value, buf, lengthCache, parameter, async);
144+
=> WriteCore(value, buf);
145145

146146
Task INpgsqlTypeHandler<Polygon>.Write(Polygon value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
147-
=> WriteCore(value, buf, lengthCache, parameter, async);
147+
=> WriteCore(value, buf);
148148

149149
Task INpgsqlTypeHandler<MultiPoint>.Write(MultiPoint value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
150-
=> WriteCore(value, buf, lengthCache, parameter, async);
150+
=> WriteCore(value, buf);
151151

152152
Task INpgsqlTypeHandler<MultiLineString>.Write(MultiLineString value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
153-
=> WriteCore(value, buf, lengthCache, parameter, async);
153+
=> WriteCore(value, buf);
154154

155155
Task INpgsqlTypeHandler<MultiPolygon>.Write(MultiPolygon value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
156-
=> WriteCore(value, buf, lengthCache, parameter, async);
156+
=> WriteCore(value, buf);
157157

158158
Task INpgsqlTypeHandler<GeometryCollection>.Write(GeometryCollection value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
159-
=> WriteCore(value, buf, lengthCache, parameter, async);
159+
=> WriteCore(value, buf);
160160

161-
Task WriteCore(Geometry value, NpgsqlWriteBuffer buf, NpgsqlLengthCache? lengthCache, NpgsqlParameter? parameter, bool async)
161+
Task WriteCore(Geometry value, NpgsqlWriteBuffer buf)
162162
{
163163
_writer.Write(value, buf.GetStream());
164164
return Task.CompletedTask;

src/Npgsql.NetTopologySuite/NpgsqlNetTopologySuiteExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Npgsql.TypeMapping;
88
using NpgsqlTypes;
99

10+
// ReSharper disable once CheckNamespace
1011
namespace Npgsql
1112
{
1213
/// <summary>

src/Npgsql.RawPostgis/NpgsqlRawPostgisExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Npgsql.LegacyPostgis;
1+
using Npgsql.RawPostgis;
22
using Npgsql.TypeMapping;
33
using NpgsqlTypes;
44

src/Npgsql.RawPostgis/PostgisRawHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
66

7-
namespace Npgsql.LegacyPostgis
7+
namespace Npgsql.RawPostgis
88
{
99
public class PostgisRawHandlerFactory : NpgsqlTypeHandlerFactory<byte[]>
1010
{

src/Npgsql/BackendMessages/AuthenticationMessages.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.Generic;
3-
using System.Diagnostics;
1+
using System.Collections.Generic;
42
using Npgsql.Logging;
53
using Npgsql.Util;
64

0 commit comments

Comments
 (0)