Ejemplo n.º 1
0
        public virtual void Start()
        {
            DynamoPathManager.Instance.InitializeCore(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));

            DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance);

            AppDomain.CurrentDomain.AssemblyResolve += AssemblyHelper.ResolveAssembly;
            CreateTemporaryFolder();

            // Setup Temp PreferenceSetting Location for testing
            PreferenceSettings.DynamoTestPath = Path.Combine(TempFolder, "UserPreferenceTest.xml");

            Model = DynamoModel.Start(
                new DynamoModel.StartConfiguration()
            {
                StartInTestMode = true
            });

            ViewModel = DynamoViewModel.Start(
                new DynamoViewModel.StartConfiguration()
            {
                DynamoModel = Model
            });

            //create the view
            View = new DynamoView(ViewModel);
            View.Show();

            SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
        }
Ejemplo n.º 2
0
        private static void MakeStandaloneAndRun(string commandFilePath, ref DynamoViewModel viewModel)
        {
            DynamoPathManager.Instance.InitializeCore(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));

            DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance);

            var model = DynamoModel.Start(
                new DynamoModel.StartConfiguration()
            {
                Preferences = PreferenceSettings.Load()
            });

            viewModel = DynamoViewModel.Start(
                new DynamoViewModel.StartConfiguration()
            {
                CommandFilePath = commandFilePath,
                DynamoModel     = model
            });

            var view = new DynamoView(viewModel);

            var app = new Application();

            app.Run(view);
        }
Ejemplo n.º 3
0
 public virtual void Setup()
 {
     AssemblyResolver.Setup();
     DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance);
     application.OnBeginExecution(session);
     HostFactory.Instance.StartUp();
 }
Ejemplo n.º 4
0
        public void SetUp()
        {
            DynamoPathManager.Instance.InitializeCore(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
            DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance);

            AppDomain.CurrentDomain.AssemblyResolve += AssemblyHelper.ResolveAssembly;

            application.OnBeginExecution(session);
            HostFactory.Instance.StartUp();
        }
Ejemplo n.º 5
0
        protected void StartDynamo()
        {
            DynamoPathManager.Instance.InitializeCore(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));

            DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance);

            schedulerThread = new SampleSchedulerThread();
            dynamoModel     = DynamoModel.Start(
                new DynamoModel.StartConfiguration()
            {
                // See documentation for 'SchedulerIntegrationTests' above.
                StartInTestMode = false,
                SchedulerThread = schedulerThread
            });
        }
Ejemplo n.º 6
0
        protected void StartDynamo()
        {
            DynamoPathManager.Instance.InitializeCore(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));

            DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance);

            var model = DynamoModel.Start(
                new DynamoModel.StartConfiguration()
            {
                StartInTestMode = true
            });

            this.ViewModel = DynamoViewModel.Start(
                new DynamoViewModel.StartConfiguration()
            {
                DynamoModel = model
            });
        }
Ejemplo n.º 7
0
        public virtual void Setup()
        {
            AssemblyResolver.Setup();

            SetupCore();

            if (string.IsNullOrEmpty(workingDirectory))
            {
                workingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            }

            DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance);

            CreateTemporaryFolder();

            // Setup Temp PreferenceSetting Location for testing
            PreferenceSettings.DynamoTestPath = Path.Combine(TempFolder, "UserPreferenceTest.xml");

            StartDynamo();
        }
Ejemplo n.º 8
0
        public override void Setup()
        {
            AssemblyResolver.Setup();

            SetupCore();

            if (string.IsNullOrEmpty(workingDirectory))
            {
                workingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            }

            // We override the RevitSystemTestBase's Setup method here
            // so we can specify that we want to load a specific version
            // of ASM. Revit 2016 will not work with any version of ASM before 221.
            DynamoPathManager.PreloadAsmVersion("221", DynamoPathManager.Instance);

            CreateTemporaryFolder();

            // Setup Temp PreferenceSetting Location for testing
            PreferenceSettings.DynamoTestPath = Path.Combine(TempFolder, "UserPreferenceTest.xml");

            StartDynamo();
        }