コード例 #1
0
 public void AfterTest()
 {
     windowManagementModule          = null;
     windowMovementEventProducer     = null;
     windowFocusEventProducer        = null;
     windowStateChangedEventProducer = null;
     windowResizingEventProducer     = null;
     container.Dispose();
     container         = null;
     hookNativeMethods = null;
 }
コード例 #2
0
        public void BeforeTest()
        {
            windowManagementModule          = new WindowManagementModule();
            windowFocusEventProducer        = new WindowFocusEventProducer();
            windowMovementEventProducer     = new WindowMovementEventProducer();
            windowResizingEventProducer     = new WindowResizingEventProducer();
            windowStateChangedEventProducer = new WindowStateChangedEventProducer();

            container = new CompositionContainer();
            container.ComposeExportedValue(windowFocusEventProducer);
            container.ComposeExportedValue(windowMovementEventProducer);
            container.ComposeExportedValue(windowResizingEventProducer);
            container.ComposeExportedValue(windowStateChangedEventProducer);
            container.ComposeParts(windowManagementModule);

            hookNativeMethods = new HookNativeMethodsMock();
            hookNativeMethods.Initialize();
        }