void Configure(AuthDictionary dict) { auths = dict; foreach (var pair in auths) { log.Verbose("Registering user '{0}' with level {1}.", pair.Key, pair.Value.Level); } }
public UserAuthManager(string filename, WatchConfig watcher, Logger log) { this.log = log; // Setting up configuration. var xmlConf = new XmlConfig2 <AuthDictionary>( AuthDictionary.DefaultConfig(), (xml) => new AuthDictionary(xml), log, Configure ); watcher.LoadAndWatch(filename, xmlConf.LoadConfig); }