private void loadConfig(ConfigProtectedData cfg) { foreach (var pair in cfg.Providers.Nested) { if (pair.Key == "clear") { if (onClearing()) { continue; } _providers.Clear(); continue; } if (pair.Key == "add") { Append(getNameValueCollection(pair.Value)); continue; } throw new InvalidOperationException(string.Format("unexpected element `{0}'", pair.Key)); } }
private void loadConfig(ConfigProtectedData cfg) { foreach(var pair in cfg.Providers.Nested) { if (pair.Key == "clear") { if (onClearing()) continue; _providers.Clear(); continue; } if (pair.Key == "add") { Append(getNameValueCollection(pair.Value)); continue; } throw new InvalidOperationException(string.Format("unexpected element `{0}'", pair.Key)); } }