Example #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="options">Watch CLI options.</param>
        public WatchAction(WatchOptions options)
        {
            _options  = options;
            _compiler = new CompileAction(CompileOptions.FromWatchOptions(options), true);
            _logger   = new WatcherLogger();

            _timer = new Timer
            {
                AutoReset = true,
                Interval  = 200
            };
            _timer.Elapsed += OnRecompile;
        }
Example #2
0
        /// <summary>
        /// Runs the compile action.
        /// </summary>
        /// <param name="options">CLI options for the compile action.</param>
        /// <param name="fromMain">Wheter or not this is called from the main method.</param>
        /// <returns>CLI return code.</returns>
        private static int Compile(CompileOptions options, bool fromMain = true)
        {
            CompileAction compiler = new CompileAction(options);
            int           result   = compiler.Run();

#if DEBUG
            if (fromMain == true)
            {
                Console.Read();
            }
#endif

            return(result);
        }
Example #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="options">Deploy CLI options.</param>
 public DeployAction(DeployOptions options)
 {
     _options  = options;
     _compiler = new CompileAction(CompileOptions.FromDeployOptions(options), true);
     _logger   = new DeployerLogger();
 }