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()); }
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); }
public virtual void Setup() { AssemblyResolver.Setup(); DynamoPathManager.PreloadAsmLibraries(DynamoPathManager.Instance); application.OnBeginExecution(session); HostFactory.Instance.StartUp(); }
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(); }
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 }); }
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 }); }
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(); }
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(); }