Example #1
0
 public void MergeFrom(ChaincodeDeploymentSpec other)
 {
     if (other == null)
     {
         return;
     }
     if (other.chaincodeSpec_ != null)
     {
         if (chaincodeSpec_ == null)
         {
             chaincodeSpec_ = new global::Chaincode.NET.Protos.ChaincodeSpec();
         }
         ChaincodeSpec.MergeFrom(other.ChaincodeSpec);
     }
     if (other.effectiveDate_ != null)
     {
         if (effectiveDate_ == null)
         {
             effectiveDate_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         EffectiveDate.MergeFrom(other.EffectiveDate);
     }
     if (other.CodePackage.Length != 0)
     {
         CodePackage = other.CodePackage;
     }
     if (other.ExecEnv != 0)
     {
         ExecEnv = other.ExecEnv;
     }
 }
Example #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 10: {
                    if (chaincodeSpec_ == null)
                    {
                        chaincodeSpec_ = new global::Chaincode.NET.Protos.ChaincodeSpec();
                    }
                    input.ReadMessage(chaincodeSpec_);
                    break;
                }

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

                case 26: {
                    CodePackage = input.ReadBytes();
                    break;
                }

                case 32: {
                    execEnv_ = (global::Chaincode.NET.Protos.ChaincodeDeploymentSpec.Types.ExecutionEnvironment)input.ReadEnum();
                    break;
                }
                }
            }
        }