コード例 #1
0
 private void _read()
 {
     _len  = new PackedInt(m_io, this, m_root);
     _body = m_io.ReadBytes(Len.Value);
 }
コード例 #2
0
 private void _read()
 {
     _len  = new PackedInt(m_io, this, m_root);
     _name = System.Text.Encoding.GetEncoding("UTF-8").GetString(m_io.ReadBytes(Len.Value));
 }
コード例 #3
0
            private void _read()
            {
                _code = ((RubyMarshal.Codes)m_io.ReadU1());
                switch (Code)
                {
                case RubyMarshal.Codes.PackedInt:
                {
                    _body = new PackedInt(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.Bignum:
                {
                    _body = new Bignum(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.RubyArray:
                {
                    _body = new RubyArray(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.RubySymbolLink:
                {
                    _body = new PackedInt(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.RubyStruct:
                {
                    _body = new RubyStruct(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.RubyString:
                {
                    _body = new RubyString(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.InstanceVar:
                {
                    _body = new InstanceVar(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.RubyHash:
                {
                    _body = new RubyHash(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.RubySymbol:
                {
                    _body = new RubySymbol(m_io, this, m_root);
                    break;
                }

                case RubyMarshal.Codes.RubyObjectLink:
                {
                    _body = new PackedInt(m_io, this, m_root);
                    break;
                }
                }
            }
コード例 #4
0
 private void _read()
 {
     _sign    = m_io.ReadU1();
     _lenDiv2 = new PackedInt(m_io, this, m_root);
     _body    = m_io.ReadBytes((LenDiv2.Value * 2));
 }