Update ZNI Library

This commit is contained in:
Tara 2022-12-31 13:11:13 -07:00
parent 0638f7e642
commit eeadcb1959
10 changed files with 753 additions and 388 deletions

View file

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LibZNI.Serialization.ZNIFile
{
public class uLongTag : Tag
{
private ulong LongVal;
public ulong Value
{
get
{
return LongVal;
}
}
public uLongTag(string _Name, ulong val)
{
Name = _Name;
LongVal = val;
}
public uLongTag(ulong _LongVal) : this(null, _LongVal)
{
}
public uLongTag() : this(null, 0) { }
public override TagType Type
{
get
{
return TagType.ULONG;
}
}
public override bool ReadTag(BinaryReader br)
{
Name = br.ReadString();
LongVal = br.ReadUInt64();
return true;
}
public override void Rename(string old, string newName)
{
throw new NotImplementedException();
}
public override void SkipTag(BinaryReader br)
{
_ = new uLongTag().ReadTag(br);
}
public override void WriteData(BinaryWriter bw)
{
throw new NotImplementedException();
}
public override void WriteTag(BinaryWriter bw)
{
bw.Write(((int)Type));
bw.Write(Name);
bw.Write(Value);
}
public override object Clone()
{
return new uLongTag(Name, Value);
}
}
}