public FromStream ( ZetboxStreamReader sr ) : IEnumerable |
||
sr | ZetboxStreamReader | |
return | IEnumerable |
public void Stream() { var typeMap = scope.Resolve<TypeMap>(); var ms = new MemoryStream(); var sw = new ZetboxStreamWriter(typeMap, new BinaryWriter(ms)); var sr = new ZetboxStreamReader(typeMap, new BinaryReader(ms)); obj.ToStream(sw, null, false); Assert.That(ms.Length, Is.GreaterThan(0)); ms.Seek(0, SeekOrigin.Begin); TestCompoundObject result = new TestCompoundObject(); result.FromStream(sr); Assert.That(result.TestInt, Is.EqualTo(obj.TestInt)); Assert.That(result.TestString, Is.EqualTo(obj.TestString)); }
public void FromStream_Null_StreamReader() { TestCompoundObject result = new TestCompoundObject(); result.FromStream((ZetboxStreamReader)null); }