Esempio n. 1
0
            public void FromData(IPdxReader reader)
            {
                _mId = reader.ReadInt("id");

                var isIdentity = reader.IsIdentityField("id");

                if (isIdentity == false)
                {
                    throw new IllegalStateException("Pdx1 id is identity field");
                }

                var isId = reader.HasField("id");

                if (isId == false)
                {
                    throw new IllegalStateException("Pdx1 id field not found");
                }

                var isNotId = reader.HasField("ID");

                if (isNotId)
                {
                    throw new IllegalStateException("Pdx1 isNotId field found");
                }

                _mPkid          = reader.ReadString("pkid");
                _mType          = reader.ReadString("type");
                _mStatus        = reader.ReadString("status");
                _mNames         = reader.ReadStringArray("names");
                _mNewVal        = reader.ReadByteArray("newVal");
                _mCreationDate  = reader.ReadDate("creationDate");
                _mArrayNull     = reader.ReadByteArray("arrayNull");
                _mArrayZeroSize = reader.ReadByteArray("arrayZeroSize");
            }
Esempio n. 2
0
            public void FromData(IPdxReader reader)
            {
                m_id = reader.ReadInt("id");

                bool isIdentity = reader.IsIdentityField("id");

                if (isIdentity == false)
                {
                    throw new IllegalStateException("Pdx1 id is identity field");
                }

                bool isId = reader.HasField("id");

                if (isId == false)
                {
                    throw new IllegalStateException("Pdx1 id field not found");
                }

                bool isNotId = reader.HasField("ID");

                if (isNotId == true)
                {
                    throw new IllegalStateException("Pdx1 isNotId field found");
                }

                m_pkid          = reader.ReadString("pkid");
                m_type          = reader.ReadString("type");
                m_status        = reader.ReadString("status");
                m_names         = reader.ReadStringArray("names");
                m_newVal        = reader.ReadByteArray("newVal");
                m_creationDate  = reader.ReadDate("creationDate");
                m_arrayNull     = reader.ReadByteArray("arrayNull");
                m_arrayZeroSize = reader.ReadByteArray("arrayZeroSize");
            }
        public void FromData(IPdxReader r)
        {
            _street     = r.ReadString("_street");
            _aptName    = r.ReadString("_aptName");
            _flatNumber = r.ReadInt("_flatNumber");
            string s = r.ReadString("_guid");

            _guid = new Guid(s);
        }
 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");
 }
Esempio n. 5
0
 public void FromData(IPdxReader reader)
 {
     m_id            = reader.ReadInt("ID");
     m_pkid          = reader.ReadString("pkid");
     m_position1     = (PositionPdx)reader.ReadObject("position1");
     m_position2     = (PositionPdx)reader.ReadObject("position2");
     m_positions     = (Hashtable)reader.ReadObject("positions");
     m_type          = reader.ReadString("type");
     m_status        = reader.ReadString("status");
     m_names         = reader.ReadStringArray("names");
     m_newVal        = reader.ReadByteArray("newVal");
     m_creationDate  = reader.ReadDate("creationDate");
     m_arrayNull     = reader.ReadByteArray("arrayNull");
     m_arrayZeroSize = reader.ReadByteArray("arrayZeroSize");
 }
Esempio n. 6
0
 public void FromData(IPdxReader reader)
 {
     m_avg20DaysVol      = reader.ReadLong("avg20DaysVol");
     m_bondRating        = reader.ReadString("bondRating");
     m_convRatio         = reader.ReadDouble("convRatio");
     m_country           = reader.ReadString("country");
     m_delta             = reader.ReadDouble("delta");
     m_industry          = reader.ReadLong("industry");
     m_issuer            = reader.ReadLong("issuer");
     m_mktValue          = reader.ReadDouble("mktValue");
     m_qty               = reader.ReadDouble("qty");
     m_secId             = reader.ReadString("secId");
     m_secLinks          = reader.ReadString("secLinks");
     m_secType           = reader.ReadString("secType");
     m_sharesOutstanding = reader.ReadInt("sharesOutstanding");
     m_underlyer         = reader.ReadString("underlyer");
     m_volatility        = reader.ReadLong("volatility");
     m_pid               = reader.ReadInt("pid");
 }
Esempio n. 7
0
 public object FromData(string classname, IPdxReader reader)
 {
     throw new NotImplementedException();
 }
Esempio n. 8
0
 public void FromData(IPdxReader input)
 {
     OrderId  = input.ReadLong(ORDER_ID_KEY_);
     Name     = input.ReadString(NAME_KEY_);
     Quantity = (short)input.ReadInt(QUANTITY_KEY_);
 }
Esempio n. 9
0
 public void FromData(IPdxReader reader)
 {
     m_first  = reader.ReadInt("m_first");
     m_second = reader.ReadLong("m_second");
 }
Esempio n. 10
0
        public void FromData(IPdxReader reader)
        {
            //byte[][] baa = reader.ReadArrayOfByteArrays("m_byteByteArray");
            //m_byteByteArray = compareByteByteArray(baa, m_byteByteArray);

            //bool bl = reader.ReadBoolean("m_bool");
            //m_bool = compareBool(bl, m_bool);
            //m_boolArray =  compareBoolArray(reader.ReadBooleanArray("m_boolArray"), m_boolArray);

            //m_byte = compareByte(reader.ReadByte("m_byte"), m_byte);
            //m_byteArray = compareByteArray(reader.ReadByteArray("m_byteArray"), m_byteArray);
            //m_charArray = compareCharArray(reader.ReadCharArray("m_charArray"), m_charArray);
            //List<object> tmpl = new List<object>();
            //reader.ReadCollection("m_list", tmpl);
            //m_list = compareCompareCollection(tmpl, m_list);

            //m_dateTime = compareData(reader.ReadDate("m_dateTime"), m_dateTime);

            //m_double = compareDouble(reader.ReadDouble("m_double"), m_double);

            //m_doubleArray = compareDoubleArray(reader.ReadDoubleArray("m_doubleArray"), m_doubleArray);
            //m_float = compareFloat(reader.ReadFloat("m_float"), m_float);
            //m_floatArray = compareFloatArray(reader.ReadFloatArray("m_floatArray"), m_floatArray);
            //m_int16 = compareInt16(reader.ReadInt16("m_int16"), m_int16);
            //m_int32 = compareInt32(reader.ReadInt32("m_int32"), m_int32);
            //m_long = compareInt64(reader.ReadInt64("m_long"), m_long);
            //m_int32Array = compareIntArray(reader.ReadIntArray("m_int32Array"), m_int32Array);
            //m_longArray = compareLongArray(reader.ReadLongArray("m_longArray"), m_longArray);
            //m_int16Array = compareSHortArray(reader.ReadShortArray("m_int16Array"), m_int16Array);
            //m_sbyte = compareSByte(reader.ReadSByte("m_sbyte"), m_sbyte);
            //m_sbyteArray = compareSByteArray(reader.ReadSByteArray("m_sbyteArray"), m_sbyteArray);
            //m_stringArray = compareStringArray(reader.ReadStringArray("m_stringArray"), m_stringArray);
            //m_uint16 = compareUInt16(reader.ReadUInt16("m_uint16"), m_uint16);
            //m_uint32 = compareUInt32(reader.ReadUInt32("m_uint32") , m_uint32);
            //m_ulong = compareUint64(reader.ReadUInt64("m_ulong"), m_ulong);
            //m_uint32Array = compareUnsignedIntArray(reader.ReadUnsignedIntArray("m_uint32Array"), m_uint32Array);
            //m_ulongArray = compareUnsignedLongArray(reader.ReadUnsignedLongArray("m_ulongArray"), m_ulongArray);
            //m_uint16Array = compareUnsignedShortArray(reader.ReadUnsignedShortArray("m_uint16Array"), m_uint16Array);

            byte[][] baa = reader.ReadArrayOfByteArrays("m_byteByteArray");
            m_byteByteArray = compareByteByteArray(baa, m_byteByteArray);
            m_char          = GenericValCompare(reader.ReadChar("m_char"), m_char);

            bool bl = reader.ReadBoolean("m_bool");

            m_bool      = GenericValCompare(bl, m_bool);
            m_boolArray = GenericCompare(reader.ReadBooleanArray("m_boolArray"), m_boolArray);

            m_byte      = GenericValCompare(reader.ReadByte("m_byte"), m_byte);
            m_byteArray = GenericCompare(reader.ReadByteArray("m_byteArray"), m_byteArray);
            m_charArray = GenericCompare(reader.ReadCharArray("m_charArray"), m_charArray);

            List <object> tmpl = new List <object>();

            tmpl        = (List <object>)reader.ReadObject("m_arraylist");
            m_arraylist = compareCompareCollection(tmpl, m_arraylist);

            IDictionary <object, object> tmpM = (IDictionary <object, object>)reader.ReadObject("m_map");

            if (tmpM.Count != m_map.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_map.GetType().ToString());
            }

            Hashtable tmpH = (Hashtable)reader.ReadObject("m_hashtable");

            if (tmpH.Count != m_hashtable.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_hashtable.GetType().ToString());
            }

            ArrayList arrAl = (ArrayList)reader.ReadObject("m_vector");

            if (arrAl.Count != m_vector.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_vector.GetType().ToString());
            }

            CacheableHashSet rmpChs = (CacheableHashSet)reader.ReadObject("m_chs");

            if (rmpChs.Count != m_chs.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_chs.GetType().ToString());
            }

            CacheableLinkedHashSet rmpClhs = (CacheableLinkedHashSet)reader.ReadObject("m_clhs");

            if (rmpClhs.Count != m_clhs.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_clhs.GetType().ToString());
            }


            m_string = GenericValCompare(reader.ReadString("m_string"), m_string);

            m_dateTime = compareData(reader.ReadDate("m_dateTime"), m_dateTime);

            m_double = GenericValCompare(reader.ReadDouble("m_double"), m_double);

            m_doubleArray = GenericCompare(reader.ReadDoubleArray("m_doubleArray"), m_doubleArray);
            m_float       = GenericValCompare(reader.ReadFloat("m_float"), m_float);
            m_floatArray  = GenericCompare(reader.ReadFloatArray("m_floatArray"), m_floatArray);
            m_int16       = GenericValCompare(reader.ReadShort("m_int16"), m_int16);
            m_int32       = GenericValCompare(reader.ReadInt("m_int32"), m_int32);
            m_long        = GenericValCompare(reader.ReadLong("m_long"), m_long);
            m_int32Array  = GenericCompare(reader.ReadIntArray("m_int32Array"), m_int32Array);
            m_longArray   = GenericCompare(reader.ReadLongArray("m_longArray"), m_longArray);
            m_int16Array  = GenericCompare(reader.ReadShortArray("m_int16Array"), m_int16Array);
            m_sbyte       = GenericValCompare(reader.ReadByte("m_sbyte"), m_sbyte);
            m_sbyteArray  = GenericCompare(reader.ReadByteArray("m_sbyteArray"), m_sbyteArray);
            m_stringArray = GenericCompare(reader.ReadStringArray("m_stringArray"), m_stringArray);
            m_uint16      = GenericValCompare(reader.ReadShort("m_uint16"), m_uint16);
            m_uint32      = GenericValCompare(reader.ReadInt("m_uint32"), m_uint32);
            m_ulong       = GenericValCompare(reader.ReadLong("m_ulong"), m_ulong);
            m_uint32Array = GenericCompare(reader.ReadIntArray("m_uint32Array"), m_uint32Array);
            m_ulongArray  = GenericCompare(reader.ReadLongArray("m_ulongArray"), m_ulongArray);
            m_uint16Array = GenericCompare(reader.ReadShortArray("m_uint16Array"), m_uint16Array);

            byte[] ret = reader.ReadByteArray("m_byte252");
            if (ret.Length != 252)
            {
                throw new Exception("Array len 252 not found");
            }

            ret = reader.ReadByteArray("m_byte253");
            if (ret.Length != 253)
            {
                throw new Exception("Array len 253 not found");
            }

            ret = reader.ReadByteArray("m_byte65535");
            if (ret.Length != 65535)
            {
                throw new Exception("Array len 65535 not found");
            }

            ret = reader.ReadByteArray("m_byte65536");
            if (ret.Length != 65536)
            {
                throw new Exception("Array len 65536 not found");
            }

            pdxEnumTest retenum = (pdxEnumTest)reader.ReadObject("m_pdxEnum");

            if (retenum != m_pdxEnum)
            {
                throw new Exception("Enum is not equal");
            }
            //byte[] m_byte252 = new byte[252];
            //byte[] m_byte253 = new byte[253];
            //byte[] m_byte65535 = new byte[65535];
            //byte[] m_byte65536 = new byte[65536];

            Address[] addressArray = (Address[])reader.ReadObject("m_address");

            {
                for (int i = 0; i < m_address.Length; i++)
                {
                    if (!m_address[i].Equals(addressArray[i]))
                    {
                        Debug.WriteLine(m_address[i]);
                        Debug.WriteLine(addressArray[i]);
                        throw new Exception("Address array not mateched " + i);
                    }
                }
            }

            List <object> retoa = reader.ReadObjectArray("m_objectArray");

            for (int i = 0; i < m_objectArray.Count; i++)
            {
                if (!m_objectArray[i].Equals(retoa[i]))
                {
                    throw new Exception("Object array not mateched " + i);
                }
            }
        }
Esempio n. 11
0
 public void FromData(IPdxReader reader)
 {
     _aptNumber = reader.ReadInt("_aptNumber");
     _street    = reader.ReadString("_street");
     _city      = reader.ReadString("_city");
 }
Esempio n. 12
0
 public void FromData(IPdxReader r)
 {
     _baseclassmember = r.ReadInt("_baseclassmember");
 }