Esempio n. 1
0
 public void MergeFrom(ChaincodeSpec other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     if (other.chaincodeId_ != null)
     {
         if (chaincodeId_ == null)
         {
             chaincodeId_ = new global::Chaincode.NET.Protos.ChaincodeID();
         }
         ChaincodeId.MergeFrom(other.ChaincodeId);
     }
     if (other.input_ != null)
     {
         if (input_ == null)
         {
             input_ = new global::Chaincode.NET.Protos.ChaincodeInput();
         }
         Input.MergeFrom(other.Input);
     }
     if (other.Timeout != 0)
     {
         Timeout = other.Timeout;
     }
 }
Esempio n. 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    type_ = (global::Chaincode.NET.Protos.ChaincodeSpec.Types.Type)input.ReadEnum();
                    break;
                }

                case 18: {
                    if (chaincodeId_ == null)
                    {
                        chaincodeId_ = new global::Chaincode.NET.Protos.ChaincodeID();
                    }
                    input.ReadMessage(chaincodeId_);
                    break;
                }

                case 26: {
                    if (input_ == null)
                    {
                        input_ = new global::Chaincode.NET.Protos.ChaincodeInput();
                    }
                    input.ReadMessage(input_);
                    break;
                }

                case 32: {
                    Timeout = input.ReadInt32();
                    break;
                }
                }
            }
        }