Beispiel #1
0
        internal InteractiveWindowTestHost(ExportProvider exportProvider)
        {
            _exportProvider = exportProvider.AsExportProvider();

            Evaluator = new TestInteractiveEvaluator();
            Window    = _exportProvider.GetExport <IInteractiveWindowFactoryService>().Value.CreateWindow(Evaluator);
            Window.InitializeAsync().Wait();
        }
 internal InteractiveWindowTestHost(
     IInteractiveWindowFactoryService interactiveWindowFactory
     )
 {
     Evaluator = new TestInteractiveEvaluator();
     Window    = interactiveWindowFactory.CreateWindow(Evaluator);
     Window.InitializeAsync().Wait();
 }
        internal InteractiveWindowTestHost()
        {
            _exportProvider = new CompositionContainer(
                s_lazyCatalog.Value,
                CompositionOptions.DisableSilentRejection | CompositionOptions.IsThreadSafe);

            var contentTypeRegistryService = _exportProvider.GetExport<IContentTypeRegistryService>().Value;
            Evaluator = new TestInteractiveEvaluator();
            Window = _exportProvider.GetExport<IInteractiveWindowFactoryService>().Value.CreateWindow(Evaluator);
            Window.InitializeAsync().Wait();
        }
        internal InteractiveWindowTestHost(Action<InteractiveWindow.State> stateChangedHandler = null)
        {
            ExportProvider = new CompositionContainer(
                _lazyCatalog.Value,
                CompositionOptions.DisableSilentRejection | CompositionOptions.IsThreadSafe);

            var contentTypeRegistryService = ExportProvider.GetExport<IContentTypeRegistryService>().Value;
            Evaluator = new TestInteractiveEvaluator();
            Window = ExportProvider.GetExport<IInteractiveWindowFactoryService>().Value.CreateWindow(Evaluator);
            ((InteractiveWindow)Window).StateChanged += stateChangedHandler;
            Window.InitializeAsync().Wait();
        }
        internal InteractiveWindowTestHost()
        {
            _exportProvider = new CompositionContainer(
                s_lazyCatalog.Value,
                CompositionOptions.DisableSilentRejection | CompositionOptions.IsThreadSafe);

            var contentTypeRegistryService = _exportProvider.GetExport <IContentTypeRegistryService>().Value;

            Evaluator = new TestInteractiveEvaluator();
            Window    = _exportProvider.GetExport <IInteractiveWindowFactoryService>().Value.CreateWindow(Evaluator);
            Window.InitializeAsync().Wait();
        }
        internal InteractiveWindowTestHost(Action <InteractiveWindow.State> stateChangedHandler = null)
        {
            ExportProvider = new CompositionContainer(
                _lazyCatalog.Value,
                CompositionOptions.DisableSilentRejection | CompositionOptions.IsThreadSafe);

            var contentTypeRegistryService = ExportProvider.GetExport <IContentTypeRegistryService>().Value;

            Evaluator = new TestInteractiveEvaluator();
            Window    = ExportProvider.GetExport <IInteractiveWindowFactoryService>().Value.CreateWindow(Evaluator);
            ((InteractiveWindow)Window).StateChanged += stateChangedHandler;
            Window.InitializeAsync().Wait();
        }