From fdafa596832eae13cebcf5bbe5fa867f7ba068f0 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 21 Feb 2013 20:26:35 -0500 Subject: Removed System.Windows.Forms dependancy from Common. Almost done removing NLog dependancy. --- MediaBrowser.Common/Logging/WindowTraceListener.cs | 75 ---------------------- 1 file changed, 75 deletions(-) delete mode 100644 MediaBrowser.Common/Logging/WindowTraceListener.cs (limited to 'MediaBrowser.Common/Logging/WindowTraceListener.cs') diff --git a/MediaBrowser.Common/Logging/WindowTraceListener.cs b/MediaBrowser.Common/Logging/WindowTraceListener.cs deleted file mode 100644 index 046dedf86e..0000000000 --- a/MediaBrowser.Common/Logging/WindowTraceListener.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Diagnostics; - -namespace MediaBrowser.Common.Logging -{ - /// - /// Class WindowTraceListener - /// - public class WindowTraceListener : DefaultTraceListener - { - /// - /// The _window - /// - private readonly LogWindow _window; - /// - /// Initializes a new instance of the class. - /// - /// The window. - public WindowTraceListener(LogWindow window) - { - _window = window; - _window.Show(); - Name = "MBLogWindow"; - } - - /// - /// Writes the value of the object's method to the listener you create when you implement the class. - /// - /// An whose fully qualified class name you want to write. - public override void Write(object o) - { - var str = o as string; - if (str != null) - Write(str); - else - base.Write(o); - } - - /// - /// Writes the output to the OutputDebugString function and to the method. - /// - /// The message to write to OutputDebugString and . - /// - /// - /// - /// - public override void Write(string message) - { - _window.LogMessage(message); - } - - /// - /// Writes the output to the OutputDebugString function and to the method, followed by a carriage return and line feed (\r\n). - /// - /// The message to write to OutputDebugString and . - /// - /// - /// - /// - public override void WriteLine(string message) - { - Write(message+"\n"); - } - - /// - /// Releases the unmanaged resources used by the and optionally releases the managed resources. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - protected override void Dispose(bool disposing) - { - if (_window != null) - _window.ShutDown(); - base.Dispose(disposing); - } - } -} -- cgit v1.2.3