@@ -48,8 +48,12 @@ namespace NUnitLite.Runner
4848 /// as Windows Phone, the results will simply not appear if
4949 /// you fail to specify a file in the call itself or as an option.
5050 /// </summary>
51- public class TextUI : ITestListener
51+ public class TextUI
52+ #if ! SILVERLIGHT
53+ : ITestListener
54+ #endif // !SILVERLIGHT
5255 {
56+ #if ! SILVERLIGHT
5357 private CommandLineOptions commandLineOptions ;
5458
5559 private NUnit . ObjectList assemblies = new NUnit . ObjectList ( ) ;
@@ -60,7 +64,7 @@ public class TextUI : ITestListener
6064
6165 private ITestAssemblyRunner runner ;
6266
63- #region Constructors
67+ #region Constructors
6468
6569 /// <summary>
6670 /// Initializes a new instance of the <see cref="TextUI"/> class.
@@ -86,9 +90,13 @@ public TextUI(TextWriter writer, ITestListener listener)
8690 this . listener = listener ;
8791 }
8892
89- #endregion
93+ #endregion
9094
91- #region Public Methods
95+ #endif // !SILVERLIGHT
96+
97+ #region Public Methods
98+
99+ #if ! SILVERLIGHT
92100
93101 /// <summary>
94102 /// Execute a test run based on the aruments passed
@@ -124,11 +132,11 @@ public void Execute(string[] args)
124132 if ( commandLineOptions . Wait && commandLineOptions . OutFile != null )
125133 writer . WriteLine ( "Ignoring /wait option - only valid for Console" ) ;
126134
127- #if SILVERLIGHT
128- IDictionary loadOptions = new System . Collections . Generic . Dictionary < string , string > ( ) ;
129- #else
135+ // #if SILVERLIGHT
136+ // IDictionary loadOptions = new System.Collections.Generic.Dictionary<string, string>();
137+ // #else
130138 IDictionary loadOptions = new Hashtable ( ) ;
131- #endif
139+ // #endif
132140 //if (options.Load.Count > 0)
133141 // loadOptions["LOAD"] = options.Load;
134142
@@ -214,6 +222,7 @@ public void Execute(string[] args)
214222 }
215223 }
216224 }
225+ #endif // !SILVERLIGHT
217226
218227 /// <summary>
219228 /// Write the standard header information to a TextWriter.
@@ -273,9 +282,11 @@ public static void WriteRuntimeEnvironment(TextWriter writer)
273282 writer . WriteLine ( ) ;
274283 }
275284
276- #endregion
285+ #endregion
286+
287+ #if ! SILVERLIGHT
277288
278- #region Helper Methods
289+ #region Helper Methods
279290
280291 private void RunTests ( ITestFilter filter )
281292 {
@@ -327,9 +338,9 @@ private void ExploreTests()
327338 Console . WriteLine ( "Test info saved as {0}." , listFile ) ;
328339 }
329340
330- #endregion
341+ #endregion
331342
332- #region ITestListener Members
343+ #region ITestListener Members
333344
334345 /// <summary>
335346 /// A test has just started
@@ -357,6 +368,8 @@ public void TestOutput(TestOutput testOutput)
357368 {
358369 }
359370
360- #endregion
371+ #endregion
372+
373+ #endif // !SILVERLIGHT
361374 }
362375}
0 commit comments