public void SetUp() { nameParser = new NameParser(); searcherFactory = A.Fake <ISearcherFactory>(); directoryEntryAdapter = A.Fake <IDirectoryEntryAdapter>(); groupConfig = A.Fake <IGroupsConfig>(); filterBuilder = new FilterBuilder(A.Fake <IServerConfig>()); adapter = new GroupEntryAdapter(groupConfig, directoryEntryAdapter, searcherFactory, filterBuilder, nameParser); }
public GroupEntryAdapter(IGroupsConfig groupConfig, IDirectoryEntryAdapter directoryEntryAdapter, ISearcherFactory searcherFactory, IFilterBuilder filterBuilder, INameParser nameParser) : base(searcherFactory) { this.groupConfig = groupConfig; this.directoryEntryAdapter = directoryEntryAdapter; this.filterBuilder = filterBuilder; this.nameParser = nameParser; }
public GroupEntryAdapter(IGroupsConfig groupConfig, IDirectoryEntryAdapter directoryEntryAdapter, ISearcherFactory searcherFactory, IFilterBuilder filterBuilder, INameParser nameParser) : base(searcherFactory) { this.groupConfig = groupConfig; this.directoryEntryAdapter = directoryEntryAdapter; this.filterBuilder = filterBuilder; this.nameParser = nameParser; }
private void Configure(object sender, EventArgs e) { var config = sender as IConfig; if(config != null) { config.Discarded -= Configure; } config = configRepository.GetConfig(); var configSection = GetConfigSection(config); serverConfig = serverConfigFactory.Create(configSection); usersConfig = usersConfigFactory.Create(configSection); groupsConfig = groupsConfigFactory.Create(configSection); container = new Container(this); // Auto reconfigure all values when this config object is disposed (droped from the cache) config.Discarded += Configure; }
private void Configure(object sender, EventArgs e) { var config = sender as IConfig; if (config != null) { config.Discarded -= Configure; } config = configRepository.GetConfig(); var configSection = GetConfigSection(config); serverConfig = serverConfigFactory.Create(configSection); usersConfig = usersConfigFactory.Create(configSection); groupsConfig = groupsConfigFactory.Create(configSection); container = new Container(this); // Auto reconfigure all values when this config object is disposed (droped from the cache) config.Discarded += Configure; }