static List GetLocalScenarioList()

in DiagManager/DiagClasses/DiagFactory.cs [204:235]


        static List<Scenario> GetLocalScenarioList(XPathNodeIterator iter)
        {

            List<Scenario> tempList = new List<Scenario>();

            while (iter.MoveNext())
            {
                string tempname = iter.Current.GetAttribute("name", "");
                bool tempenabled = Convert.ToBoolean(iter.Current.GetAttribute("enabled", ""));

                //enable this for all Scenarios
                if (tempname == "All" && tempenabled == true)
                {
                    return GlobalScenarioList;
                }
                if (tempenabled)
                {
                    Scenario temp = GlobalScenarioList.Find(x => x.Name == tempname);
                    //if global templatelist populated
                    if (temp == null && GlobalScenarioList.Count > 0)
                    {
                        throw new ArgumentException(string.Format("template {0} doesn't exist in global list", tempname));
                    }
                    else
                    {
                        tempList.Add(temp);
                    }
                }

            }
            return tempList;
        }