Abc.Zebus.Testing.Integration.TestService.LogError(string)

Here are the examples of the csharp api class Abc.Zebus.Testing.Integration.TestService.LogError(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: Zebus
Source File: TestService.cs
public void Build()
        {
            LogInfo("Building service in \"" + _buildDirectory + "\"");
            System.IO.Directory.CreateDirectory(_buildDirectory);
            var process = new Process
            {
                StartInfo = new ProcessStartInfo(IntegrationTestFixture.GetPathFromRepositoryBase(@"tools\nant\nant.exe"))
                {
                    UseShellExecute = false,
                    RedirectStandardOutput = RedirectOutput,
                    RedirectStandardInput = RedirectOutput,
                    RedirectStandardError = RedirectOutput,
                    CreateNoWindow = true,
                    Arguments = "-buildfile:" + Path.GetFileName(_buildFile) + " build-only -D:build.dir=\"" + _buildDirectory + "\"",
                    WorkingDirectory = Path.GetDirectoryName(_buildFile),
                }
            };
            
            process.ErrorDataReceived += (sender, args) => LogError(args.Data);
            process.OutputDataReceived += (sender, args) => LogInfo(args.Data);

            process.Start();

            if(RedirectOutput)
                process.BeginOutputReadLine();

            process.WaitForExit();
            LogInfo("Build complete");

            File.Copy(_configurationFile, Path.Combine(_buildDirectory, "Abc.Zebus.Host.exe.config"), true);
            LogInfo("Config file copied");
        }

2. Example

Project: Zebus
Source File: TestService.cs
public void Start()
        {
            LogInfo("Starting " + _serviceName);

            var mutexName = _serviceName + "." + Guid.NewGuid().ToString().Substring(0, 6);
            CreateMutex(mutexName);

            _process = new Process
            {
                StartInfo = new ProcessStartInfo(Path.Combine(_buildDirectory, _hostFileName))
                {
                    WorkingDirectory = _buildDirectory,
                    UseShellExecute = false,
                    RedirectStandardOutput = RedirectOutput,
                    RedirectStandardInput = RedirectOutput,
                    RedirectStandardError = RedirectOutput,
                    CreateNoWindow = true,
                    Arguments = "/MutexName:" + mutexName
                }
            };

            _process.ErrorDataReceived += (sender, args) => LogError(args.Data);
            _process.OutputDataReceived += (sender, args) => LogInfo(args.Data);
            _process.Start();

            if (RedirectOutput)
                _process.BeginOutputReadLine();
        }