protected override void Arrange() { base.Arrange(); HostAdapter = new SingleHierarchyConfigurationUIHostAdapter(new HostAdapterConfiguration(AppDomain.CurrentDomain.BaseDirectory), null); ConfigurationSourceModel sourceModel = (ConfigurationSourceModel)HostAdapter.GetService(typeof(ConfigurationSourceModel)); sourceModel.AddSection(CacheManagerSettings.SectionName, new CacheManagerSettings {DefaultCacheManager = "Cache Manager", CacheManagers = { { new CacheManagerData { Name = "Cache Manager" } } }, BackingStores = {{ new CustomCacheStorageData("name", "custom store type") }} }); CachingViewModel = sourceModel.Sections.Single(); CacheManager = CachingViewModel.GetDescendentsOfType<CacheManagerData>().First(); }
protected override void Arrange() { base.Arrange(); HostAdapter = new SingleHierarchyConfigurationUIHostAdapter(new HostAdapterConfiguration(AppDomain.CurrentDomain.BaseDirectory), null); ConfigurationSourceModel sourceModel = (ConfigurationSourceModel)HostAdapter.GetService(typeof(ConfigurationSourceModel)); sourceModel.AddSection(CacheManagerSettings.SectionName, new CacheManagerSettings { DefaultCacheManager = "Cache Manager", CacheManagers = { { new CacheManagerData { Name = "Cache Manager" } } }, BackingStores = { { new CustomCacheStorageData("name", "custom store type") } } }); CachingViewModel = sourceModel.Sections.Single(); CacheManager = CachingViewModel.GetDescendentsOfType <CacheManagerData>().First(); }
protected override void Arrange() { base.Arrange(); HostAdapter = new SingleHierarchyConfigurationUIHostAdapter(new HostAdapterConfiguration(AppDomain.CurrentDomain.BaseDirectory), null); ConfigurationSourceModel sourceModel = (ConfigurationSourceModel)HostAdapter.GetService(typeof(ConfigurationSourceModel)); sourceModel.AddSection( LoggingSettings.SectionName, new LoggingSettings { DefaultCategory = "category", TraceSources = { new TraceSourceData("category", System.Diagnostics.SourceLevels.Critical) }, TraceListeners = { new FormattedEventLogTraceListenerData("event log", "source", "formatter") }, Formatters = { new CustomFormatterData("formatter", "custom formatter type") } }); LoggingViewModel = sourceModel.Sections.Single(); TraceListener = LoggingViewModel.GetDescendentsOfType <TraceListenerData>().First(); }
protected override void Act() { hostAdapter = new SingleHierarchyConfigurationUIHostAdapter(new HostAdapterConfiguration(AppDomain.CurrentDomain.BaseDirectory), null); }