mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-09 22:38:06 -05:00
Import code from previous AssetBuilder version
This commit is contained in:
@ -0,0 +1,45 @@
|
||||
using System.Collections.Generic;
|
||||
using ZoneCodeGenerator.Parsing;
|
||||
|
||||
namespace ZoneCodeGeneratorTests.Parsing.Mock
|
||||
{
|
||||
class IncludingParsingStreamTest : IIncludingParsingStream
|
||||
{
|
||||
public string Filename { get; set; }
|
||||
public int Line { get; set; }
|
||||
public List<string> Lines { get; }
|
||||
public bool EndOfStream => Line >= Lines.Count;
|
||||
public string LastInclude { get; private set; }
|
||||
public int IncludeCount { get; private set; }
|
||||
|
||||
public IncludingParsingStreamTest(string filename)
|
||||
{
|
||||
Line = 0;
|
||||
Filename = filename;
|
||||
Lines = new List<string>();
|
||||
LastInclude = "";
|
||||
IncludeCount = 0;
|
||||
}
|
||||
|
||||
public string ReadLine()
|
||||
{
|
||||
return EndOfStream ? "" : Lines[Line++];
|
||||
}
|
||||
|
||||
public void IncludeFile(string filename)
|
||||
{
|
||||
LastInclude = filename;
|
||||
IncludeCount++;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user