public IStatProjectDeletionFilter BuildStatProjectDeletionFilter(List <IStatProjectDeletionFilter> statProjectDeletionFilters) { for (int i = 0; i < statProjectDeletionFilters.Count - 1; i++) { IStatProjectDeletionFilter filter = statProjectDeletionFilters[i]; IStatProjectDeletionFilter nextFilter = statProjectDeletionFilters[i + 1]; filter.Set(nextFilter); } return(statProjectDeletionFilters[0]); }
public FiltersManager(IFiltersFactory filtersFactory, IFiltersChainBuilder filtersChainBuilder) { List<IStatWatchingFilter> statWatchingFilters = filtersFactory.CreateStatWatchingFilters(); List<IStatUserRegistrationFilter> statUserRegistrationFilters = filtersFactory.CreateStatUserRegistrationFilters(); List<IStatProjectUploadingFilter> statProjectUploadingFilters = filtersFactory.CreateStatProjectUploadingFilters(); List<IStatProjectDeletionFilter> statProjectDeletionFilters = filtersFactory.CreateStatProjectDeletionFilters(); List<IStatProjectCancellationFilter> statProjectCancellationFilters = filtersFactory.CreateStatProjectCancellationFilters(); _statWatchingFilter = filtersChainBuilder.BuildStatWatchingFilter(statWatchingFilters); _statUserRegistrationFilter = filtersChainBuilder.BuildStatUserRegistrationFilter(statUserRegistrationFilters); _statProjectUploadingFilter = filtersChainBuilder.BuildStatProjectUploadingFilter(statProjectUploadingFilters); _statProjectDeletionFilter = filtersChainBuilder.BuildStatProjectDeletionFilter(statProjectDeletionFilters); _statProjectCancellationFilter = filtersChainBuilder.BuildStatProjectCancellationFilter(statProjectCancellationFilters); }
public FiltersManager(IFiltersFactory filtersFactory, IFiltersChainBuilder filtersChainBuilder) { List <IStatWatchingFilter> statWatchingFilters = filtersFactory.CreateStatWatchingFilters(); List <IStatUserRegistrationFilter> statUserRegistrationFilters = filtersFactory.CreateStatUserRegistrationFilters(); List <IStatProjectUploadingFilter> statProjectUploadingFilters = filtersFactory.CreateStatProjectUploadingFilters(); List <IStatProjectDeletionFilter> statProjectDeletionFilters = filtersFactory.CreateStatProjectDeletionFilters(); List <IStatProjectCancellationFilter> statProjectCancellationFilters = filtersFactory.CreateStatProjectCancellationFilters(); _statWatchingFilter = filtersChainBuilder.BuildStatWatchingFilter(statWatchingFilters); _statUserRegistrationFilter = filtersChainBuilder.BuildStatUserRegistrationFilter(statUserRegistrationFilters); _statProjectUploadingFilter = filtersChainBuilder.BuildStatProjectUploadingFilter(statProjectUploadingFilters); _statProjectDeletionFilter = filtersChainBuilder.BuildStatProjectDeletionFilter(statProjectDeletionFilters); _statProjectCancellationFilter = filtersChainBuilder.BuildStatProjectCancellationFilter(statProjectCancellationFilters); }