コード例 #1
0
 public void MergeFrom(ChaincodeSpec other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Type != global::Protos.ChaincodeSpec.Types.Type.Undefined)
     {
         Type = other.Type;
     }
     if (other.chaincodeId_ != null)
     {
         if (chaincodeId_ == null)
         {
             ChaincodeId = new global::Protos.ChaincodeID();
         }
         ChaincodeId.MergeFrom(other.ChaincodeId);
     }
     if (other.input_ != null)
     {
         if (input_ == null)
         {
             Input = new global::Protos.ChaincodeInput();
         }
         Input.MergeFrom(other.Input);
     }
     if (other.Timeout != 0)
     {
         Timeout = other.Timeout;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
コード例 #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

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

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

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

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