Exemplo n.º 1
0
        public InputSetSummary[] GetInputSets()
        {
            Log("Requested input sets");
            var sets = new InputSets(Scenario);

            InputSetSummary[] result = new InputSetSummary[sets.All.Count];
            for (int i = 0; i < result.Length; i++)
            {
                var inputSet = sets.All[i];
                result[i] = new InputSetSummary
                {
                    URL           = String.Format("{0}/{1}", UriTemplates.InputSets, URLSafeString(inputSet.Name)),
                    Name          = inputSet.Name,
                    Configuration = sets.Instructions(inputSet)
                };

                string fn = sets.Filename(inputSet);

                if (!String.IsNullOrEmpty(fn))
                {
                    result[i].Filename    = fn;
                    result[i].ReloadOnRun = sets.ReloadOnRun(inputSet);
                }
            }
            return(result);
        }
Exemplo n.º 2
0
        public void Create(InputSetSummary summary)
        {
            var set = new InputSet(summary.Name);

            Scenario.Network.InputSets.Add(set);
            UpdateInstructions(set, summary.Configuration);
        }
Exemplo n.º 3
0
        public void UpdateInputSet(string inputSetName, InputSetSummary summary)
        {
            Log("Updating Input Set Commands for " + inputSetName);
            var      sets = new InputSets(Scenario);
            InputSet set  = sets.Find(inputSetName);

            sets.UpdateInstructions(set, summary.Configuration);
        }
Exemplo n.º 4
0
        public void CreateInputSet(InputSetSummary newInputSet)
        {
            Log("Creating new Input Set: " + newInputSet.Name);

            var sets = new InputSets(Scenario);

            sets.Create(newInputSet);
        }