private static MessageQueueTarget CreateTarget(MessageQueueProxy messageQueueTestProxy, bool createQueue, string queueName = "Test", bool checkIfQueueExists = true) { var target = new MessageQueueTarget { MessageQueueProxy = messageQueueTestProxy, Queue = queueName, CreateQueueIfNotExists = createQueue, CheckIfQueueExists = checkIfQueueExists, }; target.Initialize(null); return(target); }
private static LogFactory SetupMsmqTarget(MessageQueueProxy messageQueueTestProxy, bool createQueue, string queueName = "Test", bool checkIfQueueExists = true) { return(new LogFactory().Setup().LoadConfiguration(cfg => { var target = new MessageQueueTarget { MessageQueueProxy = messageQueueTestProxy, Queue = queueName, CreateQueueIfNotExists = createQueue, CheckIfQueueExists = checkIfQueueExists, }; cfg.Configuration.AddRuleForAllLevels(target); }).LogFactory); }