コード例 #1
0
 public void MergeFrom(SchedulerConf other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Policy.Length != 0)
     {
         Policy = other.Policy;
     }
     if (other.RoutineNum != 0)
     {
         RoutineNum = other.RoutineNum;
     }
     if (other.DefaultProcNum != 0)
     {
         DefaultProcNum = other.DefaultProcNum;
     }
     if (other.classicConf_ != null)
     {
         if (classicConf_ == null)
         {
             classicConf_ = new global::Apollo.Cyber.Proto.ClassicConf();
         }
         ClassicConf.MergeFrom(other.ClassicConf);
     }
     if (other.choreographyConf_ != null)
     {
         if (choreographyConf_ == null)
         {
             choreographyConf_ = new global::Apollo.Cyber.Proto.ChoreographyConf();
         }
         ChoreographyConf.MergeFrom(other.ChoreographyConf);
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Policy.Length != 0)
            {
                hash ^= Policy.GetHashCode();
            }
            if (RoutineNum != 0)
            {
                hash ^= RoutineNum.GetHashCode();
            }
            if (DefaultProcNum != 0)
            {
                hash ^= DefaultProcNum.GetHashCode();
            }
            if (classicConf_ != null)
            {
                hash ^= ClassicConf.GetHashCode();
            }
            if (choreographyConf_ != null)
            {
                hash ^= ChoreographyConf.GetHashCode();
            }
            return(hash);
        }