예제 #1
0
        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));
            }
        }
예제 #2
0
        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));
            }
        }