public override void Execute(ConsoleApplicationBase consoleApplication, IList<ArgumentInfo> args)
        {
            var options = from arg in args
                        where arg.Type == ArgumentType.Option
                        select arg;

            if(options.Count() < 1 || string.IsNullOrEmpty(ProjectName))
            {
                consoleApplication.PrintHelpMessage();
                return;
            }

            if(!NoLogo)
            {
                consoleApplication.PrintLogo();
            }

            Console.WriteLine("Starting Tree Generation{0}", Environment.NewLine);
            
            Console.WriteLine("       Project Name: \"{0}\"", ProjectName);
            Console.WriteLine("            Version: \"{0}\"", Version);
            Console.WriteLine("Unit Test Framework: \"{0}\"", UnitTestFramework);
            
            Console.WriteLine();

            var frontEnd = new TreeSurgeonFrontEnd(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), Version);

            if(Overwrite)
            {
                Directory.Delete(frontEnd.GetOutputPath(ProjectName), true);
            }

            var outputDirectory = frontEnd.GenerateDevelopmentTree(ProjectName, UnitTestFramework);
            Console.WriteLine("Tree Generation complete.{0}{0}Files can be found at:{0}\"{1}\"", Environment.NewLine, outputDirectory);
        }
 public override void Execute(
     ConsoleApplicationBase consoleApplication, 
     IList<ArgumentInfo> args)
 {
     Console.WriteLine(Assembly
         .GetEntryAssembly()
         .GetName()
         .Version
         .ToString());
 }
 public override void Execute(
     ConsoleApplicationBase consoleApplication,
     IList<ArgumentInfo> args)
 {
     var integers = from arg in args
                    where arg.Category == ArgumentCategory.Parameter
                    select arg.Argument;
     int num1, num2, result;
     try
     {
         num1 = int.Parse(integers.ElementAt(0));
         num2 = int.Parse(integers.ElementAt(1));
     }
     catch
     {
         consoleApplication.PrintHelpMessage();
         return;
     }
     if (!this.NoLogo)
         consoleApplication.PrintBanner();
     try
     {
         switch (this.Method.ToUpper())
         {
             case "ADD":
                 result = num1 + num2;
                 break;
             case "SUB":
                 result = num1 - num2;
                 break;
             case "MUL":
                 result = num1 * num2;
                 break;
             case "DIV":
                 result = num1 / num2;
                 break;
             default:
                 consoleApplication.PrintHelpMessage();
                 return;
         }
         Console.WriteLine(result);
     }
     catch (DivideByZeroException)
     {
         Console.WriteLine("Divided by zero error caught.");
         return;
     }
 }
 public override void Execute(ConsoleApplicationBase consoleApplication, IList<ArgumentInfo> args)
 {
     consoleApplication.PrintHelpMessage();
 }
        /// <summary>
        /// Executes the contract.
        /// </summary>
        /// <param name="consoleApplicationBase">The console application instance on which the contract is executed.</param>
        /// <param name="iList">The argument list carried with the argument information.</param>
        internal void DoExecute(ConsoleApplicationBase consoleApplicationBase, IList<ArgumentInfo> iList)
        {
            OptionContractAttribute attrib = this.Attribute;

            if (attrib.Parameters != -1 && attrib.Type == ContractType.Patternized)
            {
                var query = from arg in iList
                            where arg.Category == ArgumentCategory.Parameter
                            select arg;
                if (query.Count() != attrib.Parameters)
                {
                    consoleApplicationBase.PrintHelpMessage();
                    return;
                }
            }
            this.Execute(consoleApplicationBase, iList);
        }
 /// <summary>
 /// Executes the contract.
 /// </summary>
 /// <param name="consoleApplication">The console application instance on which the contract is executed.</param>
 /// <param name="args">The argument list carried with the argument information.</param>
 public abstract void Execute(ConsoleApplicationBase consoleApplication, IList<ArgumentInfo> args);