Ejemplo n.º 1
0
        public void Execute()
        {
            OnStart?.Invoke(_aggregate);

            try
            {
                foreach (var step in _steps)
                {
                    _aggregate.ExecuteStep(step);

                    OnStepProcessed?.Invoke(_aggregate);
                }

                _aggregate.WorkingDirectory.DeleteWithContentIfExists();
            }
            catch (Exception ex)
            {
                OnExceptionOccured?.Invoke(_aggregate, ex);
#if DEBUG
                throw;
#endif
            }

            OnEnd?.Invoke(_aggregate);
        }