Skip to content

Commit 6a767b0

Browse files
authored
Merge pull request #1854 from JonCanning/master
fix typo
2 parents 723f40d + 7c86aaa commit 6a767b0

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

LiteDB.Tests/Internals/HeaderPage_Tests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Linq;
1+
using System.Linq;
22
using FluentAssertions;
33
using LiteDB.Engine;
44
using Xunit;
@@ -25,7 +25,7 @@ public void HeaderPage_Collections()
2525
header.GetCollections().Count().Should().Be(2);
2626
((int) header.GetCollectionPageID("my-col1")).Should().Be(1);
2727
((int) header.GetCollectionPageID("my-col2")).Should().Be(2);
28-
header.GetAvaiableCollectionSpace().Should().Be(7981);
28+
header.GetAvailableCollectionSpace().Should().Be(7981);
2929

3030
header.UpdateBuffer();
3131

@@ -35,7 +35,7 @@ public void HeaderPage_Collections()
3535
h2.GetCollections().Count().Should().Be(2);
3636
((int) h2.GetCollectionPageID("my-col1")).Should().Be(1);
3737
((int) h2.GetCollectionPageID("my-col2")).Should().Be(2);
38-
h2.GetAvaiableCollectionSpace().Should().Be(7981);
38+
h2.GetAvailableCollectionSpace().Should().Be(7981);
3939

4040
buffer.ShareCounter = 0;
4141
}

LiteDB/Engine/Pages/HeaderPage.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Concurrent;
33
using System.Collections.Generic;
44
using System.Globalization;
@@ -55,9 +55,9 @@ internal class HeaderPage : BasePage
5555
/// </summary>
5656
public DateTime CreationTime { get; }
5757

58-
/// <summary>
58+
/// <summary>
5959
/// Get database pragmas instance class
60-
/// </summary>
60+
/// </summary>
6161
public EnginePragmas Pragmas { get; set; }
6262

6363
/// <summary>
@@ -243,9 +243,9 @@ public void RenameCollection(string oldName, string newName)
243243
}
244244

245245
/// <summary>
246-
/// Get how many bytes are avaiable in collection to store new collections
246+
/// Get how many bytes are available in collection to store new collections
247247
/// </summary>
248-
public int GetAvaiableCollectionSpace()
248+
public int GetAvailableCollectionSpace()
249249
{
250250
return COLLECTIONS_SIZE -
251251
_collections.GetBytesCount(true) -

LiteDB/Engine/Services/CollectionService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Text;
@@ -25,7 +25,7 @@ public CollectionService(HeaderPage header, Snapshot snapshot, TransactionPages
2525
/// </summary>
2626
public static void CheckName(string name, HeaderPage header)
2727
{
28-
if (Encoding.UTF8.GetByteCount(name) > header.GetAvaiableCollectionSpace()) throw LiteException.InvalidCollectionName(name, "There is no space in header this collection name");
28+
if (Encoding.UTF8.GetByteCount(name) > header.GetAvailableCollectionSpace()) throw LiteException.InvalidCollectionName(name, "There is no space in header this collection name");
2929
if (!name.IsWord()) throw LiteException.InvalidCollectionName(name, "Use only [a-Z$_]");
3030
if (name.StartsWith("$")) throw LiteException.InvalidCollectionName(name, "Collection can't starts with `$` (reserved for system collections)");
3131
}

0 commit comments

Comments
 (0)