예제 #1
0
        public void Execute()
        {
            _lock.AcquireWriterLock(-1);

            try
            {
                if (_dependencies.Count > 0)
                {
                    throw new Exception("Not all dependencies are satisfied");
                }

                LastException = null;
                _hasExecuted  = false;
                _hasFailed    = false;

                BuilderFactory.GetBuilderByFramework(_project.Framework).Execute(_project);
            }
            catch (Exception e)
            {
                _hasFailed    = true;
                LastException = e;
            }
            finally
            {
                _hasExecuted = true;
                _lock.ReleaseWriterLock();
            }
        }