Exemple #1
0
        public void GetDifferentProperties(IdentifiedObject compared, out List <Property> valuesInOriginal, out List <Property> valuesInCompared)
        {
            valuesInCompared = new List <Property>();
            valuesInOriginal = new List <Property>();

            ResourceDescription rd = this.GetAsResourceDescription(false);

            if (compared != null)
            {
                ResourceDescription rdCompared = compared.GetAsResourceDescription(false);

                for (int i = 0; i < rd.Properties.Count; i++)
                {
                    if (rd.Properties[i] != rdCompared.Properties[i])
                    {
                        valuesInOriginal.Add(rd.Properties[i]);
                        valuesInCompared.Add(rdCompared.Properties[i]);
                    }
                }
            }
            else
            {
                for (int i = 0; i < rd.Properties.Count; i++)
                {
                    valuesInOriginal.Add(rd.Properties[i]);
                }
            }
        }
Exemple #2
0
 protected IdentifiedObject(IdentifiedObject io)
 {
     GlobalId    = io.globalId;
     Mrid        = io.mrid;
     Name        = io.name;
     Description = io.description;
 }
Exemple #3
0
 public override bool Equals(object x)
 {
     if (Object.ReferenceEquals(x, null))
     {
         return(false);
     }
     else
     {
         IdentifiedObject io = (IdentifiedObject)x;
         return((io.GlobalId == this.GlobalId) && (io.name == this.name) && (io.mrid == this.mrid));
     }
 }