public Log(string name)
 {
     this.m_TraceSource = new DefaultTraceSource(name);
     if (!this.m_TraceSource.HasBeenConfigured)
     {
         this.InitializeWithDefaultsSinceNoConfigExists();
     }
 }
 public Log(string name)
 {
     this.m_TraceSource = new DefaultTraceSource(name);
     if (!this.m_TraceSource.HasBeenConfigured)
     {
         this.InitializeWithDefaultsSinceNoConfigExists();
     }
 }
 public Log()
 {
     this.m_TraceSource = new DefaultTraceSource("DefaultSource");
     if (!this.m_TraceSource.HasBeenConfigured)
     {
         this.InitializeWithDefaultsSinceNoConfigExists();
     }
     AppDomain.CurrentDomain.ProcessExit += new EventHandler(this.CloseOnProcessExit);
 }
 public Log()
 {
     this.m_TraceSource = new DefaultTraceSource("DefaultSource");
     if (!this.m_TraceSource.HasBeenConfigured)
     {
         this.InitializeWithDefaultsSinceNoConfigExists();
     }
     AppDomain.CurrentDomain.ProcessExit += new EventHandler(this.CloseOnProcessExit);
 }
Beispiel #5
0
        private void LoadExtensions()
        {
            foreach (var extensionProvider in _extensionProviders)
            {
                foreach (var extension in extensionProvider.GetExtensions())
                {
                    try
                    {
                        Assembly.LoadFile(extension);

                        DefaultTraceSource.TraceVerbose("Loaded extension: '{0}'", extension);
                    }
                    catch (Exception exception)
                    {
                        DefaultTraceSource.TraceError(exception);
                    }
                }
            }
        }
Beispiel #6
0
        private static void Run()
        {
            var binPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);

            DefaultTraceSource.TraceInformation("Bin Path: {0}", binPath);

            var loader = new SolutionLoader();

            loader.RegisterExtensionProvider(new DirectoryExtensionProvider(binPath));

            var solution = loader.LoadSolution(CommandLine.GetArgument(1));

            var preview = CommandLine.IsSwitchSpecified("preview");

            DefaultTraceSource.TraceInformation("Preview Mode: {0}", preview);

            var job = CommandLine.GetSwitchValue("job");

            if (job != null)
            {
                var jobsToRun = solution.Jobs.Where(j => string.Equals(j.Name, job, StringComparison.OrdinalIgnoreCase)).ToArray();

                if (jobsToRun.Length != 0)
                {
                    RunJobs(jobsToRun, preview);
                }
                else
                {
                    using (new ColoredConsole(ConsoleColor.DarkRed))
                        Console.WriteLine("Cannot find job '{0}' to run.", job);
                }
            }
            else
            {
                RunJobs(solution.Jobs, preview);
            }
        }