public DynamoCoreSetup(string[] args) { var cmdLineArgs = StartupUtils.CommandLineArguments.Parse(args); var locale = StartupUtils.SetLocale(cmdLineArgs); _putenv(locale); commandFilePath = cmdLineArgs.CommandFilePath; ASMPath = cmdLineArgs.ASMPath; analyticsInfo = cmdLineArgs.AnalyticsInfo; }
private static DynamoModel StartDynamoWithDefaultConfig(bool CLImode, string geometryFactoryPath, string preloaderLocation, HostAnalyticsInfo info = new HostAnalyticsInfo()) { var config = new DynamoModel.DefaultStartConfiguration() { GeometryFactoryPath = geometryFactoryPath, ProcessMode = TaskProcessMode.Asynchronous, HostAnalyticsInfo = info }; config.UpdateManager = CLImode ? null : InitializeUpdateManager(); config.StartInTestMode = CLImode ? true : false; config.PathResolver = CLImode ? new CLIPathResolver(preloaderLocation) as IPathResolver : new SandboxPathResolver(preloaderLocation) as IPathResolver; var model = DynamoModel.Start(config); return(model); }
/// <summary> /// Use this overload to construct a DynamoModel when the location of ASM to use is known and host analytics info is known. /// </summary> /// <param name="CLImode">CLI mode starts the model in test mode and uses a separate path resolver.</param> /// <param name="asmPath">Path to directory containing geometry library binaries</param> /// <param name="info">Host analytics info</param> /// <returns></returns> public static DynamoModel MakeModel(bool CLImode, string asmPath = "", HostAnalyticsInfo info = new HostAnalyticsInfo()) { PreloadASM(asmPath, out string geometryFactoryPath, out string preloaderLocation); return(StartDynamoWithDefaultConfig(CLImode, geometryFactoryPath, preloaderLocation, info)); }