Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            Org.Apache.Zookeeper.Txn.Txn txn = (Org.Apache.Zookeeper.Txn.Txn)obj;
            if (txn == null)
            {
                return(false);
            }
            if (object.ReferenceEquals((object)txn, (object)this))
            {
                return(true);
            }
            bool flag1 = this.Type == txn.Type;

            if (!flag1)
            {
                return(flag1);
            }
            bool flag2 = this.Data.Equals((object)txn.Data);

            if (!flag2)
            {
                return(flag2);
            }
            return(flag2);
        }
Exemplo n.º 2
0
  public void Deserialize(IInputArchive a_, String tag) {
    a_.StartRecord(tag);
    {
      IIndex vidx1 = a_.StartVector("txns");
      if (vidx1!= null) {          var tmpLst=new System.Collections.Generic.List<Org.Apache.Zookeeper.Txn.Txn>();
          for (; !vidx1.Done(); vidx1.Incr()) {
    Org.Apache.Zookeeper.Txn.Txn e1;
    e1= new Org.Apache.Zookeeper.Txn.Txn();
    a_.ReadRecord(e1,"e1");
            tmpLst.Add(e1);
          }
            Txns=tmpLst;
      }
    a_.EndVector("txns");
    }
    a_.EndRecord(tag);
}
Exemplo n.º 3
0
        public void Deserialize(IInputArchive a_, string tag)
        {
            a_.StartRecord(tag);
            IIndex index = a_.StartVector("txns");

            if (index != null)
            {
                List <Org.Apache.Zookeeper.Txn.Txn> list = new List <Org.Apache.Zookeeper.Txn.Txn>();
                while (!index.Done())
                {
                    Org.Apache.Zookeeper.Txn.Txn r = new Org.Apache.Zookeeper.Txn.Txn();
                    a_.ReadRecord(r, "e1");
                    list.Add(r);
                    index.Incr();
                }
                this.Txns = list;
            }
            a_.EndVector("txns");
            a_.EndRecord(tag);
        }
Exemplo n.º 4
0
        public int CompareTo(object obj)
        {
            Org.Apache.Zookeeper.Txn.Txn txn = (Org.Apache.Zookeeper.Txn.Txn)obj;
            if (txn == null)
            {
                throw new InvalidOperationException("Comparing different types of records.");
            }
            int num = 0;

            num = (this.Type == txn.Type) ? 0 : ((this.Type < txn.Type) ? -1 : 1);
            if (num == 0)
            {
                num = this.Data.CompareTo(txn.Data);
                if (num != 0)
                {
                    return(num);
                }
            }
            return(num);
        }
Exemplo n.º 5
0
        public void Deserialize(IInputArchive a_, string tag)
        {
            a_.StartRecord(tag);
            IIndex index = a_.StartVector("txns");

            if (index != null)
            {
                List <Org.Apache.Zookeeper.Txn.Txn> txnList = new List <Org.Apache.Zookeeper.Txn.Txn>();
                while (!index.Done())
                {
                    Org.Apache.Zookeeper.Txn.Txn txn = new Org.Apache.Zookeeper.Txn.Txn();
                    a_.ReadRecord((IRecord)txn, "e1");
                    txnList.Add(txn);
                    index.Incr();
                }
                this.Txns = (IEnumerable <Org.Apache.Zookeeper.Txn.Txn>)txnList;
            }
            a_.EndVector("txns");
            a_.EndRecord(tag);
        }
Exemplo n.º 6
0
 public void Deserialize(IInputArchive a_, String tag)
 {
     a_.StartRecord(tag);
     {
         IIndex vidx1 = a_.StartVector("txns");
         if (vidx1 != null)
         {
             var tmpLst = new System.Collections.Generic.List <Org.Apache.Zookeeper.Txn.Txn>();
             for (; !vidx1.Done(); vidx1.Incr())
             {
                 Org.Apache.Zookeeper.Txn.Txn e1;
                 e1 = new Org.Apache.Zookeeper.Txn.Txn();
                 a_.ReadRecord(e1, "e1");
                 tmpLst.Add(e1);
             }
             Txns = tmpLst;
         }
         a_.EndVector("txns");
     }
     a_.EndRecord(tag);
 }
Exemplo n.º 7
0
        public override bool Equals(object obj)
        {
            Org.Apache.Zookeeper.Txn.Txn objA = (Org.Apache.Zookeeper.Txn.Txn)obj;
            if (objA == null)
            {
                return(false);
            }
            if (object.ReferenceEquals(objA, this))
            {
                return(true);
            }
            bool flag = false;

            flag = this.Type == objA.Type;
            if (flag)
            {
                flag = this.Data.Equals(objA.Data);
                if (!flag)
                {
                    return(flag);
                }
            }
            return(flag);
        }