NetworkLoggerTests StartLogServer Method Delta Engine Documentation

Namespace: DeltaEngine.Logging.Tests
Assembly: DeltaEngine.Logging.Tests (in DeltaEngine.Logging.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void StartLogServer()
Examples

[TestFixtureSetUp]
public void StartLogServer()
{
    server = new LocalhostLogServer(new TcpServer());
    server.Start();
    new MockSettings();
    var ready = false;
    var connection = new OnlineServiceConnection();
    connection.DataReceived += o => ready = true;
    connection.Connect("localhost", LocalhostLogServer.Port);
    connection.Send(new LoginRequest("", "DeltaEngine.Logging.Tests"));
    logger = new NetworkLogger(connection);
    for (int timeoutMs = 1000; timeoutMs > 0 && !ready; timeoutMs -= 10)
        Thread.Sleep(10);
    Assert.IsTrue(ready);
}
See Also