Skip to content

Commit

Permalink
修复: 例子与README不统一问题
Browse files Browse the repository at this point in the history
  • Loading branch information
davyxu committed Jul 1, 2017
1 parent b3bc979 commit 87e04f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ tabtoy --mode=exportorv2 --json_out=config.json Table.xlsx
}

var config = new gamedef.Config();
config.Deserialize(reader);
table.Config.Deserialize(config, reader);

// 直接通过下标获取或遍历
var directFetch = config.Sample[2];
Expand Down
6 changes: 6 additions & 0 deletions exportorv2/csharp/DataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public class DataReader
BinaryReader _reader;
long _boundPos = -1;

public DataReader(Stream stream )
{
_reader = new BinaryReader(stream);
_boundPos = stream.Length;
}

public DataReader(Stream stream, long boundpos)
{
_reader = new BinaryReader(stream );
Expand Down
2 changes: 1 addition & 1 deletion exportorv2/example/csharp/Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static void Main(string[] args)
{
stream.Position = 0;

var reader = new tabtoy.DataReader(stream, stream.Length );
var reader = new tabtoy.DataReader(stream);

if ( !reader.ReadHeader( ) )
{
Expand Down

0 comments on commit 87e04f9

Please sign in to comment.