private void CreateConfiguration(Dictionary<string, object> defaultValues, NameValueCollection nameValues) { foreach (KeyValuePair<string, object> pair in defaultValues) usedValues.Add(pair.Key, pair.Value.ToString()); foreach (string key in nameValues.AllKeys) { string value = nameValues.Get(key); if (value != null) { usedValues.Remove(key); usedValues[key] = value; } } var allKeys = new BricksCollection<string>(nameValues.AllKeys); allKeys.AddRange(defaultValues.Keys); foreach (string key in allKeys) { string value = ConfigurationManager.AppSettings[key]; if (value != null) { usedValues.Remove(key); usedValues[key] = value; } } }
private void FindDescendantWindowElements(AutomationElementFinder windowFinder, Process process, BricksCollection <AutomationElement> windowElements) { List <AutomationElement> children = windowFinder.Children(AutomationSearchCondition.ByControlType(ControlType.Window).WithProcessId(process.Id)); windowElements.AddRange(children); foreach (AutomationElement automationElement in children) { FindDescendantWindowElements(new AutomationElementFinder(automationElement), process, windowElements); } }
private void FindDescendantWindowElements(AutomationElementFinder windowFinder, Process process, BricksCollection<AutomationElement> windowElements) { List<AutomationElement> children = windowFinder.Children(AutomationSearchCondition.ByControlType(ControlType.Window).WithProcessId(process.Id)); windowElements.AddRange(children); foreach (AutomationElement automationElement in children) FindDescendantWindowElements(new AutomationElementFinder(automationElement), process, windowElements); }
private DateFormat(params DateUnit[] unitsInOrder) { dateUnits.AddRange(unitsInOrder); }