コード例 #1
0
        public SerializePdx3(bool init, int nAddress)
            : base(init)
        {
            if (init)
            {
                s0           = "s9999999999999999999999999999999999";
                i1           = 1;
                i2           = 2;
                s1           = "s1";
                s2           = "s2";
                nestedObject = new SerializePdx2(true);

                _addressList = new ArrayList();
                _hashTable   = new Hashtable();

                for (int i = 0; i < 10; i++)
                {
                    _addressList.Add(new Address(i));
                    _hashTable.Add(i, new SerializePdx2(true));
                }

                _address = new Address(nAddress);

                //_arrayOfAddress = new Address[3];

                //for (int i = 0; i < 3; i++)
                //{
                //  _arrayOfAddress[i] = new Address(i);
                //}
            }
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj == this)
            {
                return(true);
            }

            SerializePdx2 other = obj as SerializePdx2;

            if (other == null)
            {
                return(false);
            }

            if (s0 == other.s0 &&
                i1 == other.i1 &&
                i2 == other.i2 &&
                s1 == other.s1 &&
                s2 == other.s2)
            {
                return(true);
            }

            return(false);
        }
コード例 #3
0
 public new void FromData(IPdxReader r)
 {
     base.FromData(r);
     s0           = r.ReadString("s0");
     i1           = r.ReadInt("i1");
     i2           = r.ReadInt("i2");
     s1           = r.ReadString("s1");
     s2           = r.ReadString("s2");
     nestedObject = (SerializePdx2)r.ReadObject("nestedObject");
     _addressList = (ArrayList)r.ReadObject("_addressList");
     _address     = (Address)r.ReadObject("_address");
     _hashTable   = (Hashtable)r.ReadObject("_hashTable");
 }
コード例 #4
0
        public SerializePdx4(bool init)
            : base(init)
        {
            if (init)
            {
                s0           = "s9999999999999999999999999999999999";
                i1           = 1;
                i2           = 2;
                s1           = "s1";
                s2           = "s2";
                nestedObject = new SerializePdx2(true);

                _addressList = new ArrayList();

                for (int i = 0; i < 10; i++)
                {
                    _addressList.Add(new Address(i));
                }
            }
        }