Ejemplo n.º 1
0
        /// <inheritdoc />
        protected override void OnDeactivate(bool close)
        {
            base.OnDeactivate(close);

            // Copy aspects, because they are cleared on deactivation
            var aspects = Aspects.Items.Cast <IProductAspect>().ToArray();

            ScreenExtensions.TryDeactivate(Aspects, close);

            if (close)
            {
                aspects.ForEach(aspect => AspectFactory.Destroy(aspect));
            }
        }