/// <summary> /// Initialize a new writer class. /// </summary> /// <param name="harness">The test harness instance.</param> /// <param name="messageFactory"> /// The factory to use when creating new messages. /// </param> public LogMessageWriter(UnitTestHarness harness, LogMessageFactory messageFactory) { if (harness == null) { throw new ArgumentNullException("harness"); } else if (messageFactory == null) { throw new ArgumentNullException("messageFactory"); } _testHarness = harness; _factory = messageFactory; }