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

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

                case 8: {
                    Version = input.ReadInt32();
                    break;
                }

                case 18: {
                    if (timestamp_ == null)
                    {
                        timestamp_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(timestamp_);
                    break;
                }

                case 34: {
                    if (response_ == null)
                    {
                        response_ = new global::Chaincode.NET.Protos.Response();
                    }
                    input.ReadMessage(response_);
                    break;
                }

                case 42: {
                    Payload = input.ReadBytes();
                    break;
                }

                case 50: {
                    if (endorsement_ == null)
                    {
                        endorsement_ = new global::Chaincode.NET.Protos.Endorsement();
                    }
                    input.ReadMessage(endorsement_);
                    break;
                }
                }
            }
        }
Esempio n. 2
0
 public void MergeFrom(ProposalResponse other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Version != 0)
     {
         Version = other.Version;
     }
     if (other.timestamp_ != null)
     {
         if (timestamp_ == null)
         {
             timestamp_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         Timestamp.MergeFrom(other.Timestamp);
     }
     if (other.response_ != null)
     {
         if (response_ == null)
         {
             response_ = new global::Chaincode.NET.Protos.Response();
         }
         Response.MergeFrom(other.Response);
     }
     if (other.Payload.Length != 0)
     {
         Payload = other.Payload;
     }
     if (other.endorsement_ != null)
     {
         if (endorsement_ == null)
         {
             endorsement_ = new global::Chaincode.NET.Protos.Endorsement();
         }
         Endorsement.MergeFrom(other.Endorsement);
     }
 }