Skip to content

Commit c0888f5

Browse files
author
Umar Hayat
authored
Fixed multiple typos (#5742)
1 parent d1c62a1 commit c0888f5

13 files changed

Lines changed: 28 additions & 28 deletions

File tree

src/Npgsql.GeoJSON/CrsMap.WellKnown.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public partial class CrsMap
55
/// <summary>
66
/// These entries came from spatial_res_sys. They are used to elide memory allocations
77
/// if they are identical to the entries for the current connection. Otherwise,
8-
/// memory allocated for overrided entries only (added, removed, or modified).
8+
/// memory allocated for overridden entries only (added, removed, or modified).
99
/// </summary>
1010
internal static readonly CrsMapEntry[] WellKnown =
1111
{

src/Npgsql.GeoJSON/CrsMap.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ namespace Npgsql.GeoJSON;
66
/// </summary>
77
public partial class CrsMap
88
{
9-
readonly CrsMapEntry[]? _overriden;
9+
readonly CrsMapEntry[]? _overridden;
1010

11-
internal CrsMap(CrsMapEntry[]? overriden)
12-
=> _overriden = overriden;
11+
internal CrsMap(CrsMapEntry[]? overridden)
12+
=> _overridden = overridden;
1313

1414
internal string? GetAuthority(int srid)
15-
=> GetAuthority(_overriden, srid) ?? GetAuthority(WellKnown, srid);
15+
=> GetAuthority(_overridden, srid) ?? GetAuthority(WellKnown, srid);
1616

1717
static string? GetAuthority(CrsMapEntry[]? entries, int srid)
1818
{

src/Npgsql.GeoJSON/Internal/CrsMapBuilder.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Npgsql.GeoJSON.Internal;
55
struct CrsMapBuilder
66
{
77
CrsMapEntry[] _overrides;
8-
int _overridenIndex;
8+
int _overriddenIndex;
99
int _wellKnownIndex;
1010

1111
internal void Add(in CrsMapEntry entry)
@@ -33,21 +33,21 @@ internal void Add(in CrsMapEntry entry)
3333

3434
void AddCore(in CrsMapEntry entry)
3535
{
36-
var index = _overridenIndex + 1;
36+
var index = _overriddenIndex + 1;
3737
if (_overrides == null)
3838
_overrides = new CrsMapEntry[4];
3939
else
4040
if (_overrides.Length == index)
4141
Array.Resize(ref _overrides, _overrides.Length << 1);
4242

43-
_overrides[_overridenIndex] = entry;
44-
_overridenIndex = index;
43+
_overrides[_overriddenIndex] = entry;
44+
_overriddenIndex = index;
4545
}
4646

4747
internal CrsMap Build()
4848
{
49-
if (_overrides != null && _overrides.Length < _overridenIndex)
50-
Array.Resize(ref _overrides, _overridenIndex);
49+
if (_overrides != null && _overrides.Length < _overriddenIndex)
50+
Array.Resize(ref _overrides, _overriddenIndex);
5151

5252
return new CrsMap(_overrides);
5353
}

src/Npgsql.GeoJSON/Internal/GeoJSONConverter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ static Size GetSize(LineString value)
323323
{
324324
var coordinates = value.Coordinates;
325325
if (NotValid(coordinates, out var hasZ))
326-
throw AllOrNoneCoordiantesMustHaveZ(nameof(LineString));
326+
throw AllOrNoneCoordinatesMustHaveZ(nameof(LineString));
327327

328328
var length = Size.Create(SizeOfHeaderWithLength + coordinates.Count * SizeOfPoint(hasZ));
329329
if (GetSrid(value.CRS) != 0)
@@ -344,12 +344,12 @@ static Size GetSize(Polygon value)
344344
{
345345
var coordinates = lines[i].Coordinates;
346346
if (NotValid(coordinates, out var lineHasZ))
347-
throw AllOrNoneCoordiantesMustHaveZ(nameof(Polygon));
347+
throw AllOrNoneCoordinatesMustHaveZ(nameof(Polygon));
348348

349349
if (hasZ != lineHasZ)
350350
{
351351
if (i == 0) hasZ = lineHasZ;
352-
else throw AllOrNoneCoordiantesMustHaveZ(nameof(LineString));
352+
else throw AllOrNoneCoordinatesMustHaveZ(nameof(LineString));
353353
}
354354

355355
length = length.Combine(coordinates.Count * SizeOfPoint(hasZ));
@@ -678,7 +678,7 @@ static int SizeOfPoint(EwkbGeometryType type)
678678
static Exception UnknownPostGisType()
679679
=> throw new InvalidOperationException("Invalid PostGIS type");
680680

681-
static Exception AllOrNoneCoordiantesMustHaveZ(string typeName)
681+
static Exception AllOrNoneCoordinatesMustHaveZ(string typeName)
682682
=> new ArgumentException($"The Z coordinate must be specified for all or none elements of {typeName}");
683683

684684
static int GetSrid(ICRSObject crs)

src/Npgsql.Json.NET/Internal/JsonNetJsonConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public override ValueTask WriteAsync(PgWriter writer, T? value, CancellationToke
3838
=> JsonNetJsonConverter.Write(_jsonb, async: true, writer, cancellationToken);
3939
}
4040

41-
// Split out to avoid unneccesary code duplication.
41+
// Split out to avoid unnecessary code duplication.
4242
static class JsonNetJsonConverter
4343
{
4444
public const byte JsonbProtocolVersion = 1;

src/Npgsql/MultiplexingDataSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ bool WriteCommand(NpgsqlConnector connector, NpgsqlCommand command, ref Multiple
270270
}
271271

272272
// There's almost certainly more buffered outgoing data for the command, after the flush
273-
// occured. Complete the write, which will flush again (and update statistics).
273+
// occurred. Complete the write, which will flush again (and update statistics).
274274
try
275275
{
276276
Flush(conn, ref clonedStats);

src/Npgsql/NpgsqlTypes/NpgsqlTsQuery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ public override int GetHashCode()
721721
}
722722

723723
/// <summary>
724-
/// Represents an empty tsquery. Shold only be used as top node.
724+
/// Represents an empty tsquery. Should only be used as top node.
725725
/// </summary>
726726
public sealed class NpgsqlTsQueryEmpty : NpgsqlTsQuery
727727
{

src/Npgsql/Util/ResettableCancellationTokenSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sealed class ResettableCancellationTokenSource : IDisposable
2323
CancellationTokenRegistration? _registration;
2424

2525
/// <summary>
26-
/// Used, so we wouldn't concurently use the cts for the cancellation, while it's being disposed
26+
/// Used, so we wouldn't concurrently use the cts for the cancellation, while it's being disposed
2727
/// </summary>
2828
readonly object lockObject = new();
2929

test/Npgsql.Tests/PrepareTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public void Overloaded_sql()
462462

463463
// SQL overloading is a pretty rare/exotic scenario. Handling it properly would involve keying
464464
// prepared statements not just by SQL but also by the parameter types, which would pointlessly
465-
// increase allocations. Instead, the second execution simply reuns unprepared
465+
// increase allocations. Instead, the second execution simply reruns unprepared
466466
AssertNumPreparedStatements(conn, 1);
467467
conn.UnprepareAll();
468468
}
@@ -659,7 +659,7 @@ public void Same_sql_different_params()
659659
using (var conn = OpenConnectionAndUnprepare())
660660
using (var cmd = new NpgsqlCommand("SELECT @p", conn))
661661
{
662-
throw new NotImplementedException("Problem: currentl setting NpgsqlParameter.Value clears/invalidates...");
662+
throw new NotImplementedException("Problem: current setting NpgsqlParameter.Value clears/invalidates...");
663663
cmd.Parameters.Add(new NpgsqlParameter("p", NpgsqlDbType.Integer));
664664
cmd.Prepare(true);
665665

test/Npgsql.Tests/SchemaTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public async Task No_parameter()
4747
Assert.That(collections1, Is.EquivalentTo(collections2));
4848
}
4949

50-
[Test, Description("Calling GetSchema(collectionName [, restrictions]) case insensive collectionName can be used")]
50+
[Test, Description("Calling GetSchema(collectionName [, restrictions]) case insensitive collectionName can be used")]
5151
public async Task Case_insensitive_collection_name()
5252
{
5353
await using var conn = await OpenConnectionAsync();

0 commit comments

Comments
 (0)