public IICConfigItemCollection <K, V> GetConfigItems <K, V>(string path, Action <IICConfigItemCollection <K, V> > onUpdate) where V : IICConfigItem { if (IICConfigurationManager.Loader == null) { throw new InvalidOperationException("No Loader Yet, You *MUST* call ServiceSettings.InitService() at First"); } try { IList <IICConfigItemBuffer> buffers = IICConfigurationManager.Loader.LoadConfigItem(path, ""); IICIndex <IICConfigItemBuffer> index = new IICIndex <IICConfigItemBuffer>("Path", "Key", "Field"); if (buffers != null) { index.BuildIndex(buffers); } IICConfigItemCollection <K, V> ret = (IICConfigItemCollection <K, V>)LoadCollection(path, typeof(K), typeof(V), typeof(IICConfigItemCollection <K, V>), index); if (onUpdate != null) { onUpdate(ret); } return(ret); } catch (Exception ex) { throw new ConfigurationFailedException(IICConfigType.ItemCollection, path, ex); } }
public override void SetDefaultValue() { Level = TracingLevel.Off; Appenders = new IICConfigItemCollection <AppenderType, TracingConfigAppenderItem>(); }
public override void SetDefaultValue() { Level = TracingLevel.Off; Appenders = new IICConfigItemCollection<AppenderType, TracingConfigAppenderItem>(); }