예제 #1
0
 public StructType(List <KaitaiStruct> p_structs, KaitaiStream p__io, ParamsPassArrayStruct p__parent = null, ParamsPassArrayStruct p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _structs = p_structs;
     _read();
 }
예제 #2
0
        public void TestParamsPassArrayStruct()
        {
            var r = ParamsPassArrayStruct.FromFile(SourceFile("position_to_end.bin"));

            Assert.AreEqual(r.PassStructs.Structs.Count, 2);
            Assert.AreEqual(((ParamsPassArrayStruct.Foo)(r.PassStructs.Structs[0])).F, 1);
            Assert.AreEqual(((ParamsPassArrayStruct.Bar)(r.PassStructs.Structs[1])).B, 2);
        }
예제 #3
0
 public Bar(KaitaiStream p__io, ParamsPassArrayStruct p__parent = null, ParamsPassArrayStruct p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
예제 #4
0
 public ParamsPassArrayStruct(KaitaiStream p__io, KaitaiStruct p__parent = null, ParamsPassArrayStruct p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root ?? this;
     f_oneTwo = false;
     _read();
 }