Ejemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 24: {
                    c_ = input.ReadInt64();
                    break;
                }

                case 34: {
                    if (d_ == null)
                    {
                        d_ = new global::Com.Zynga.Runtime.Protobuf.ChildChildMessage();
                        d_.SetParent(Context, 4);
                    }
                    input.ReadMessage(d_);
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
 public void MergeFrom(ChildMessage other)
 {
     if (other == null)
     {
         return;
     }
     if (other.C != 0L)
     {
         c_ = other.C;
     }
     if (other.d_ != null)
     {
         if (d_ == null)
         {
             d_ = new global::Com.Zynga.Runtime.Protobuf.ChildChildMessage();
             d_.SetParent(Context, 4);
         }
         D.MergeFrom(other.D);
     }
 }
Ejemplo n.º 3
0
        public override bool ApplyEvent(zpr.EventSource.EventData e, int pathIndex)
        {
            if (e.Path.Count == 0)
            {
                this.MergeFrom(e.Set.ByteData);
                return(true);
            }
            switch (e.Path[pathIndex])
            {
            case 3: {
                c_ = e.Set.I64;
            }
            break;

            case 4: {
                if (e.Path.Count - 1 != pathIndex)
                {
                    if (d_ == null)
                    {
                        d_ = new global::Com.Zynga.Runtime.Protobuf.ChildChildMessage();
                        d_.SetParent(Context, 4);
                    }
                    (d_ as zpr::IEventRegistry)?.ApplyEvent(e, pathIndex + 1);
                }
                else
                {
                    d_ = global::Com.Zynga.Runtime.Protobuf.ChildChildMessage.Parser.ParseFrom(e.Set.ByteData);
                    d_.SetParent(Context, 4);
                }
            }
            break;

            default:
                return(false);

                break;
            }
            return(true);
        }