/// <summary>
        /// Generates a new project.
        /// </summary>
        /// <param name="genatorArguments">The arguments needed to generate the project.</param>
        /// <param name="progressDelegate">Reports progress for all generator actions.</param>
        /// <param name="rollbackDelegate">Delegate to ask the user if an action should be rolled back or not.</param>
        /// <param name="continueAllowedFunc">Delegate to ask the main form if we are allowed to continue.</param>
        /// <returns>The outcome of the operation.</returns>
        public GeneratorResult Generate(GeneratorArguments genatorArguments, ReportProgressDelegate progressDelegate,
                                        ReportRollBackDelegate rollbackDelegate, Func<bool> continueAllowedFunc)
        {
            if (genatorArguments == null)
                throw new ArgumentNullException("genatorArguments");

            if (progressDelegate == null)
                throw new ArgumentNullException("progressDelegate");

            if (rollbackDelegate == null)
                throw new ArgumentNullException("rollbackDelegate");

            if (continueAllowedFunc == null)
                throw new ArgumentNullException("continueAllowedFunc");

            if (genatorArguments.TemplateInformation == null)
                throw new InvalidOperationException("No template information in Generate method.");

            arguments = genatorArguments;
            progress = progressDelegate;
            rollback = rollbackDelegate;
            continueAllowed = continueAllowedFunc;

            progressDelegate(0, "Starting generator");

            return GenerateInternal();
        }
        /// <summary>
        /// Generates a new project.
        /// </summary>
        /// <param name="genatorArguments">The arguments needed to generate the project.</param>
        /// <param name="progressDelegate">Reports progress for all generator actions.</param>
        /// <param name="rollbackDelegate">Delegate to ask the user if an action should be rolled back or not.</param>
        /// <param name="continueAllowedFunc">Delegate to ask the main form if we are allowed to continue.</param>
        /// <returns>The outcome of the operation.</returns>
        public GeneratorResult Generate(GeneratorArguments genatorArguments, ReportProgressDelegate progressDelegate,
                                        ReportRollBackDelegate rollbackDelegate, Func <bool> continueAllowedFunc)
        {
            if (genatorArguments == null)
            {
                throw new ArgumentNullException("genatorArguments");
            }

            if (progressDelegate == null)
            {
                throw new ArgumentNullException("progressDelegate");
            }

            if (rollbackDelegate == null)
            {
                throw new ArgumentNullException("rollbackDelegate");
            }

            if (continueAllowedFunc == null)
            {
                throw new ArgumentNullException("continueAllowedFunc");
            }

            if (genatorArguments.TemplateInformation == null)
            {
                throw new InvalidOperationException("No template information in Generate method.");
            }

            arguments       = genatorArguments;
            progress        = progressDelegate;
            rollback        = rollbackDelegate;
            continueAllowed = continueAllowedFunc;

            progressDelegate(0, "Starting generator");

            return(GenerateInternal());
        }