Esempio n. 1
0
        public int CompareTo(StackHashCabPackageCollection other)
        {
            if (other == null)
            {
                throw new ArgumentNullException("other");
            }

            if (other.Count != this.Count)
            {
                return(-1);
            }

            foreach (StackHashCabPackage thisCab in this)
            {
                StackHashCabPackage matchingCab = other.FindCab(thisCab.Cab.Id);

                if (matchingCab == null)
                {
                    return(-1);
                }

                if (matchingCab.CompareTo(thisCab) != 0)
                {
                    return(-1);
                }
            }

            // Must be a match.
            return(0);
        }
Esempio n. 2
0
        }                                    // Needed to serialize;

        public StackHashEventPackage(StackHashEventInfoCollection eventInfoList, StackHashCabPackageCollection cabs,
                                     StackHashEvent eventData, int productId)
        {
            m_EventInfoList    = eventInfoList;
            m_Cabs             = cabs;
            m_EventData        = eventData;
            m_ProductId        = productId;
            m_CriteriaMatchMap = 0;
        }
Esempio n. 3
0
        public object Clone()
        {
            StackHashCabPackageCollection cabCollection = new StackHashCabPackageCollection();

            foreach (StackHashCabPackage cab in this)
            {
                cabCollection.Add((StackHashCabPackage)cab.Clone());
            }

            return(cabCollection);
        }