public void InitializeResolver()
 {
     if (StackTraceExtensions.ForceUseOfMockResolver())
     {
         resolver = new MockResolver();
         return;
     }
     //ncrunch: no coverage start
     if (!StackTraceExtensions.StartedFromProgramMain)
     {
         StackTraceExtensions.SetUnitTestName(TestContext.CurrentContext.Test.FullName);
     }
     resolver = new SharpDXResolver();
     if (StackTraceExtensions.IsCloseAfterFirstFrameAttributeUsed() ||
         StackTraceExtensions.StartedFromNCrunchOrNunitConsole)
     {
         Resolve <Window>().CloseAfterFrame();
     }
     //ncrunch: no coverage end
 }
Exemple #2
0
 public static void Start <First, Second, Third>(Action <First, Second, Third> initCode,
                                                 Action runCode = null)
 {
     using (var resolver = new SharpDXResolver().Init(initCode))
         resolver.Run(runCode);
 }
Exemple #3
0
 public static void Start <AppEntryRunner>()
     where AppEntryRunner : Runner
 {
     using (var resolver = new SharpDXResolver().Init <AppEntryRunner>())
         resolver.Run();
 }