Exemple #1
0
        /// <summary>
        /// Determines whether the specified UtilityIdentificationSettingsCollection is equal to the current
        /// UtilityIdentificationSettingsCollection.
        /// </summary>
        /// <param name="CollectionToCompare">
        /// The UtilityIdentificationSettingsCollection to compare with the current
        /// UtilityIdentificationSettingsCollection.
        /// </param>
        /// <returns>
        /// true if the specified UtilityIdentificationSettingsCollection is equal to the current
        /// UtilityIdentificationSettingsCollection; otherwise, false.
        /// </returns>
        //  Revision History
        //  MM/DD/YY Who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  04/22/13 jrf 2.80.22 TQ8285 Created
        //
        public bool Equals(UtilityIdentificationSettingsGroupCollection CollectionToCompare)
        {
            bool blnEquals = false;

            // If parameter is null return false:
            if ((object)CollectionToCompare == null)
            {
                return(false);
            }
            else
            {
                // Return true if the collections have the same number of elements and every element from one is contained in the other.
                blnEquals = true;

                if (Count == CollectionToCompare.Count)
                {
                    foreach (UtilityIdentificatonSettingsGroupDefinition Definition in this)
                    {
                        //if just one system is not contained in the other, not equal
                        if (false == CollectionToCompare.Contains(Definition))
                        {
                            blnEquals = false;
                            break; //no need to check any more.
                        }
                    }
                }
                else //different number of elememnts, not equal
                {
                    blnEquals = false;
                }
            }

            return(blnEquals);
        }
Exemple #2
0
 /// <summary>
 /// Copy Constructor.
 /// </summary>
 /// <param name="SettingsCollection">The utility identification settigns collection to duplicate.</param>
 //  Revision History
 //  MM/DD/YY Who Version Issue# Description
 //  -------- --- ------- ------ -------------------------------------------
 //  04/22/13 jrf 2.80.22 TQ8285 Created
 //
 public UtilityIdentificationSettingsGroupCollection(UtilityIdentificationSettingsGroupCollection SettingsCollection)
     : base()
 {
     if (null != SettingsCollection)
     {
         //Populate this collection with each member of passed in collection.
         foreach (UtilityIdentificatonSettingsGroupDefinition Definition in SettingsCollection)
         {
             Add(new UtilityIdentificatonSettingsGroupDefinition(Definition));
         }
     }
 }