예제 #1
0
        public ThemePowerData Copy()
        {
            ThemePowerData themePowerDatum = new ThemePowerData()
            {
                Power = this.fPower.Copy(),
                Type  = this.fType
            };

            foreach (RoleType fRole in this.fRoles)
            {
                themePowerDatum.Roles.Add(fRole);
            }
            return(themePowerDatum);
        }
예제 #2
0
        /// <summary>
        /// Creates a copy of the power data.
        /// </summary>
        /// <returns>Returns the copy.</returns>
        public ThemePowerData Copy()
        {
            ThemePowerData tpd = new ThemePowerData();

            tpd.Power = fPower.Copy();
            tpd.Type  = fType;

            foreach (RoleType rt in fRoles)
            {
                tpd.Roles.Add(rt);
            }

            return(tpd);
        }
예제 #3
0
        public ThemePowerData FindPower(Guid power_id)
        {
            ThemePowerData themePowerDatum;

            List <ThemePowerData> .Enumerator enumerator = this.fPowers.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    ThemePowerData current = enumerator.Current;
                    if (current.Power.ID != power_id)
                    {
                        continue;
                    }
                    themePowerDatum = current;
                    return(themePowerDatum);
                }
                return(null);
            }
            finally
            {
                ((IDisposable)enumerator).Dispose();
            }
        }