Esempio n. 1
0
        static internal void Main(string[] args)
        {
            try
            {
                var cmdLineArgs = StartupUtils.CommandLineArguments.Parse(args);
                var locale      = StartupUtils.SetLocale(cmdLineArgs);
                var model       = StartupUtils.MakeModel(true);
                var runner      = new CommandLineRunner(model);
                runner.Run(cmdLineArgs);
            }
            catch (Exception e)
            {
                try
                {
                    DynamoModel.IsCrashing = true;
                    Dynamo.Logging.Analytics.TrackException(e, true);
                }
                catch
                {
                }

                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }
Esempio n. 2
0
        static internal void Main(string[] args)
        {

            try
            {
                var cmdLineArgs = StartupUtils.CommandLineArguments.Parse(args);
                var locale = Dynamo.Applications.StartupUtils.SetLocale(cmdLineArgs);
                var model = Dynamo.Applications.StartupUtils.MakeModel(true);
                var runner = new CommandLineRunner(model);
                runner.Run(cmdLineArgs);
                
            }
            catch (Exception e)
            {
                try
                {
                    DynamoModel.IsCrashing = true;
                    Dynamo.Logging.Analytics.TrackException(e, true);
                }
                catch
                {
                }

                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }
Esempio n. 3
0
        static internal void Main(string[] args)
        {

            try
            {
                var cmdLineArgs = StartupUtils.CommandLineArguments.Parse(args);
                var locale = Dynamo.Applications.StartupUtils.SetLocale(cmdLineArgs);
                var model = Dynamo.Applications.StartupUtils.MakeModel(true);
                var runner = new CommandLineRunner(model);
                runner.Run(cmdLineArgs);
                
            }
            catch (Exception e)
            {
                try
                {
                    DynamoModel.IsCrashing = true;
                    InstrumentationLogger.LogException(e);
                    StabilityTracking.GetInstance().NotifyCrash();

                }
                catch
                {
                }

                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }
Esempio n. 4
0
        static internal void Main(string[] args)
        {
            try
            {
                var cmdLineArgs = StartupUtils.CommandLineArguments.Parse(args);
                var locale      = Dynamo.Applications.StartupUtils.SetLocale(cmdLineArgs);
                var model       = Dynamo.Applications.StartupUtils.MakeModel(true);
                var runner      = new CommandLineRunner(model);
                runner.Run(cmdLineArgs);
            }
            catch (Exception e)
            {
                try
                {
                    DynamoModel.IsCrashing = true;
                    InstrumentationLogger.LogException(e);
                    StabilityTracking.GetInstance().NotifyCrash();
                }
                catch
                {
                }

                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }
Esempio n. 5
0
        public void CanOpenAndRunDynamoModelWithCommandLineRunner()
        {
            string openpath = Path.Combine(TestDirectory, @"core\math\Add.dyn");
            var runner = new CommandLineRunner(this.CurrentDynamoModel);
            string commandstring = "/o" + " " + openpath;

            runner.Run(CommandstringToArgs(commandstring));
            AssertPreviewValue("4c5889ac-7b91-4fb5-aaad-a2128b533279", 4.0);
        }
Esempio n. 6
0
        public void CanOpenAndSetSpecifcStateInDynWithCommandLineRunner()
        {

            string openpath = Path.Combine(TestDirectory, @"core\commandline\addmultwithstatesindyn.dyn");
            var runner = new CommandLineRunner(this.CurrentDynamoModel);
            string commandstring = "/o" + " " + openpath + " " + "/s" + " " + "state2";

            runner.Run(CommandstringToArgs(commandstring));
            AssertPreviewValue("6e2d89d1-d5e8-4030-b065-f9d98b3adb45", 31);
        }
Esempio n. 7
0
        static internal void Main(string[] args)
        {
            try
            {
                var cmdLineArgs = StartupUtils.CommandLineArguments.Parse(args);
                var locale      = StartupUtils.SetLocale(cmdLineArgs);
                if (cmdLineArgs.DisableAnalytics)
                {
                    Dynamo.Logging.Analytics.DisableAnalytics = true;
                }

                DynamoModel model;
                if (!String.IsNullOrEmpty(cmdLineArgs.ASMPath))
                {
                    model = Dynamo.Applications.StartupUtils.MakeModel(true, cmdLineArgs.ASMPath);
                }
                else
                {
                    model = Dynamo.Applications.StartupUtils.MakeModel(true);
                }
                var runner = new CommandLineRunner(model);
                runner.Run(cmdLineArgs);
            }
            catch (Exception e)
            {
                try
                {
                    DynamoModel.IsCrashing = true;
                    Dynamo.Logging.Analytics.TrackException(e, true);
                }
                catch
                {
                }

                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
        }
Esempio n. 8
0
        public void CanOpenAndSetSpecifcStateFromImportedPresetsFileWithCommandLineRunner()
        {

            string openpath = Path.Combine(TestDirectory, @"core\commandline\addmultwithoutstates.dyn");
            string presetspath = Path.Combine(TestDirectory, @"core\commandline\statesOnly.xml");
            var runner = new CommandLineRunner(this.CurrentDynamoModel);
            string commandstring = "/o" + " " + openpath + " " + "/s" + " " + "state2" + " " + "/p" + " " + presetspath;

            runner.Run(CommandstringToArgs(commandstring));
            AssertPreviewValue("6e2d89d1-d5e8-4030-b065-f9d98b3adb45", 31);
        }
Esempio n. 9
0
        public void CanOpenAndRunAllImportedStatesWithCommandLineRunner()
        {
            string openPath = Path.Combine(TestDirectory, @"core\commandline\addmultwithoutstates.dyn");
            string presetsPath = Path.Combine(TestDirectory, @"core\commandline\statesOnly.xml");
            var newPath = GetNewFileNameOnTempPath("xml");

            var runner = new CommandLineRunner(this.CurrentDynamoModel);
            string commandstring = "/o" + " " + openPath + " " + "/s" + " " + "all" + " " + "/p" + " " + presetsPath + " " + "/v" + " " + newPath;
            runner.Run(CommandstringToArgs(commandstring));

            var output = new XmlDocument();
            output.Load(newPath);
            AssertOutputValuesForGuid("6e2d89d1-d5e8-4030-b065-f9d98b3adb45", new List<Tuple<int, string>> { Tuple.Create(0, "10"), Tuple.Create(0, "31"), Tuple.Create(0, "20") }, output);

        }
Esempio n. 10
0
        public void CanOpenAndRunSpecifcStateAndOutputToFileWithCommandLineRunner()
        {
            string openpath = Path.Combine(TestDirectory, @"core\commandline\addmultwithstatesindyn.dyn");
            var newPath = GetNewFileNameOnTempPath("xml");

            var runner = new CommandLineRunner(this.CurrentDynamoModel);
            string commandstring = "/o" + " " + openpath + " " + "/s" + " " + "state2" + " " + "/v" + " " + newPath;
            runner.Run(CommandstringToArgs(commandstring));

            var output = new XmlDocument();
            output.Load(newPath);
            AssertOutputValuesForGuid("6e2d89d1-d5e8-4030-b065-f9d98b3adb45", new List<Tuple<int, string>> { Tuple.Create(0, "31")}, output);

        }