fix BinaryOmsStorage to inherit from StreamOmsStorage
This commit is contained in:
parent
39cdecd9f4
commit
988b29f426
@ -10,7 +10,7 @@ using Mocha.Core;
|
|||||||
using Mocha.Core.UI.Server;
|
using Mocha.Core.UI.Server;
|
||||||
using Mocha.Core.Logging;
|
using Mocha.Core.Logging;
|
||||||
using Mocha.Core.Logging.Loggers;
|
using Mocha.Core.Logging.Loggers;
|
||||||
using Mocha.Core.Storage;
|
using Mocha.Core.Storage.Binary;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -17,20 +17,24 @@
|
|||||||
|
|
||||||
namespace Mocha.Core.Storage.Binary;
|
namespace Mocha.Core.Storage.Binary;
|
||||||
|
|
||||||
public class BinaryOmsStorage : OmsStorage
|
public class BinaryOmsStorage : StreamOmsStorage
|
||||||
{
|
{
|
||||||
private Stream _Stream;
|
|
||||||
public Stream Stream { get { return _Stream; } }
|
|
||||||
|
|
||||||
private BinaryWriter _Writer;
|
private BinaryWriter _Writer;
|
||||||
private BinaryWriter Writer { get { return _Writer; } }
|
private BinaryWriter Writer { get { return _Writer; } }
|
||||||
|
|
||||||
private BinaryReader _Reader;
|
private BinaryReader _Reader;
|
||||||
private BinaryReader Reader { get { return _Reader; } }
|
private BinaryReader Reader { get { return _Reader; } }
|
||||||
|
|
||||||
public BinaryOmsStorage(Stream stream, bool readOnly = false) : base(readOnly)
|
public BinaryOmsStorage(string path, bool readOnly = false) : base(path, readOnly)
|
||||||
|
{
|
||||||
|
if (!readOnly)
|
||||||
|
{
|
||||||
|
_Writer = new BinaryWriter(Stream);
|
||||||
|
}
|
||||||
|
_Reader = new BinaryReader(Stream);
|
||||||
|
}
|
||||||
|
public BinaryOmsStorage(Stream stream, bool readOnly = false) : base(stream, readOnly)
|
||||||
{
|
{
|
||||||
_Stream = stream;
|
|
||||||
if (!readOnly)
|
if (!readOnly)
|
||||||
{
|
{
|
||||||
_Writer = new BinaryWriter(stream);
|
_Writer = new BinaryWriter(stream);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user