示例#1
0
 public void Compare(SimpleClass2 other)
 {
     if (m_val != other.m_val)
     {
         throw new Exception();
     }
 }
示例#2
0
        public DictionaryMessage(MyRandom r)
        {
            var len = r.Next(0, 1000);

            if (len > 0)
            {
                m_intMap = new Dictionary <int, int>(len);
                for (int i = 0; i < len; ++i)
                {
                    m_intMap[(int)r.Next()] = (int)r.Next();
                }
            }

            len = r.Next(0, 1000);
            if (len > 0)
            {
                m_obMap = new Dictionary <string, SimpleClass2>();
                for (int i = 0; i < len; ++i)
                {
                    var str = i.ToString();
                    m_obMap[str] = new SimpleClass2(r);
                }
            }
        }
示例#3
0
 public void Compare(SimpleClass2 other)
 {
     if (m_val != other.m_val)
         throw new Exception();
 }
示例#4
0
        public DictionaryMessage(Random r)
        {
            var len = r.Next(0, 1000);
            if (len > 0)
            {
                m_intMap = new Dictionary<int, int>(len);
                for (int i = 0; i < len; ++i)
                    m_intMap[r.Next()] = r.Next();
            }

            len = r.Next(0, 1000);
            if (len > 0)
            {
                m_obMap = new Dictionary<string, SimpleClass2>();
                for (int i = 0; i < len; ++i)
                {
                    var str = i.ToString();
                    m_obMap[str] = new SimpleClass2(r);
                }
            }
        }