Esempio n. 1
0
        public void TakeOwnership(Corporation newOwner)
        {
            if (newOwner == null)
                throw new ArgumentNullException("newOwner");

            var oldOwner = Owner;
            if (oldOwner != null)
                oldOwner.LoseStructure(this, newOwner);

            Owner = newOwner;

            this.personnel.RemoveAll(a => a.Employer == oldOwner);

            CorporationItems(oldOwner).ForEach(i => i.Owner = newOwner);
            CorporationShips(oldOwner).ForEach(s => s.Owner = newOwner);

            Owner.TakeStructure(this, oldOwner);
        }