old data
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepReader.DataSectionReader.cs"
|
||||
// file="StepDataReader.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
@@ -28,8 +28,8 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Modeling.Step;
|
||||
using StgSharp.Modeling.Step;
|
||||
using StgSharp.Script;
|
||||
|
||||
using System;
|
||||
@@ -43,7 +43,7 @@ using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Model.Step
|
||||
namespace StgSharp.Modeling.Step
|
||||
{
|
||||
public partial class StepReader
|
||||
{
|
||||
@@ -51,16 +51,15 @@ namespace StgSharp.Model.Step
|
||||
public StepDataSectionTransmitter DataTransmitter { get; } = new StepDataSectionTransmitter(
|
||||
);
|
||||
|
||||
internal async void ReadDataSection()
|
||||
public async void ReadDataSection()
|
||||
{
|
||||
using( MemoryMappedViewStream ms = _memoryFile.CreateViewStream(
|
||||
0, _size, MemoryMappedFileAccess.Read ) )
|
||||
{
|
||||
StreamReader sr = new StreamReader( ms );
|
||||
ms.Position = _dataStart;
|
||||
DataTransmitter.Begin = _dataBeginLine;
|
||||
long pos = _headStart;
|
||||
string line;
|
||||
while( !string.IsNullOrEmpty( line = sr.ReadLine()! ) ) {
|
||||
while( string.IsNullOrEmpty( line = sr.ReadLine()! ) ) {
|
||||
DataTransmitter.WriteLine( line );
|
||||
}
|
||||
sr.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user