Esempio n. 1
0
 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);
 }
Esempio n. 2
0
		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;
		}
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
		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;
		}
Esempio n. 5
0
        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;
        }