Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit aaa1588

Browse files
committed
Remove more ReSharper 'errors'
1 parent 13b70d8 commit aaa1588

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

DBFilesClient.NET/Reader.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ namespace DBFilesClient.NET
77
{
88
internal abstract class Reader : BinaryReader
99
{
10-
protected long StringTableOffset { get; set; }
10+
protected long StringTableOffset { private get; set; }
1111

12+
// ReSharper disable once MemberCanBeProtected.Global
1213
public string ReadInlineString()
1314
{
1415
var stringStart = BaseStream.Position;
@@ -26,6 +27,8 @@ public string ReadInlineString()
2627
return stringValue;
2728
}
2829

30+
// ReSharper disable once MemberCanBeProtected.Global
31+
// ReSharper disable once UnusedMemberHiearchy.Global
2932
public virtual string ReadTableString()
3033
{
3134
// Store position of the next field in this record.
@@ -44,8 +47,7 @@ public virtual string ReadTableString()
4447

4548
public event Action<int, object> OnRecordLoaded;
4649

47-
protected void TriggerRecordLoaded(int key, object record) =>
48-
OnRecordLoaded?.Invoke(key, record);
50+
protected void TriggerRecordLoaded(int key, object record) => OnRecordLoaded?.Invoke(key, record);
4951

5052
protected Reader(Stream data) : base(data)
5153
{
@@ -54,6 +56,7 @@ protected Reader(Stream data) : base(data)
5456

5557
internal abstract void Load();
5658

59+
// ReSharper disable once MemberCanBeProtected.Global
5760
public int ReadInt24()
5861
{
5962
return ReadByte() | (ReadByte() << 8) | (ReadByte() << 16);

DBFilesClient.NET/WDB2/Reader.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.IO;
44
using System.Reflection;
55
using System.Runtime.InteropServices;
6-
using System.Text;
76
using Sigil;
87

98
namespace DBFilesClient.NET.WDB2

DBFilesClient.NET/WDB5/Reader.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Linq;
66
using System.Reflection;
77
using System.Runtime.InteropServices;
8-
using System.Text;
98
using Sigil;
109

1110
namespace DBFilesClient.NET.WDB5
@@ -16,7 +15,7 @@ private class FileHeader
1615
{
1716
public int RecordSize { get; set; }
1817
public int RecordCount { get; set; }
19-
public ushort Flags { get; set; }
18+
public ushort Flags { private get; set; }
2019
public ushort IndexField { get; set; }
2120

2221
public FieldEntry[] FieldMeta { get; set; }
@@ -364,7 +363,7 @@ private LoaderDelegate GenerateRecordLoader()
364363
return emitter.CreateDelegate(OptimizationOptions.None);
365364
}
366365

367-
public class FieldEntry
366+
private class FieldEntry
368367
{
369368
public short BitSize { private get; set; }
370369
public ushort Position { get; set; }

DBFilesClient.NET/WDBC/Reader.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.IO;
44
using System.Reflection;
55
using System.Runtime.InteropServices;
6-
using System.Text;
76
using Sigil;
87

98
namespace DBFilesClient.NET.WDBC
@@ -38,7 +37,7 @@ internal override void Load()
3837
{
3938
// We get to this through the Factory, meaning we already read the signature...
4039
var recordCount = ReadInt32();
41-
ReadInt32(); // Counts arrays
40+
BaseStream.Position += 4; // Counts arrays
4241
var recordSize = ReadInt32();
4342
var stringBlockSize = ReadInt32();
4443

0 commit comments

Comments
 (0)