Exemplo n.º 1
0
        public static async Task <IReadOnlyCollection <Standard> > SearchStandards(
            this IStandardsCache cache,
            string search)
        {
            var all = await cache.GetAllStandards();

            var formattedSearchTerm = FormatSearchTerm(search);

            return(all
                   .Where(s => IsMatch(formattedSearchTerm, FormatSearchTerm(s.StandardName)))
                   .OrderBy(s => s.StandardName)
                   .ToList());
        }
Exemplo n.º 2
0
 public Handler(
     IProviderContextProvider providerContextProvider,
     IFileUploadProcessor fileUploadProcessor,
     ICurrentUserProvider currentUserProvider,
     JourneyInstanceProvider journeyInstanceProvider,
     IStandardsCache standardsCache)
 {
     _providerContextProvider = providerContextProvider;
     _fileUploadProcessor     = fileUploadProcessor;
     _currentUserProvider     = currentUserProvider;
     _journeyInstanceProvider = journeyInstanceProvider;
     _standardsCache          = standardsCache;
 }
 public ApprenticeshipsController(
     ICourseService courseService,
     ISqlQueryDispatcher sqlQueryDispatcher,
     IOptions <ApprenticeshipSettings> apprenticeshipSettings,
     IStandardsCache standardsAndFrameworksCache,
     IProviderInfoCache providerInfoCache,
     IProviderContextProvider providerContextProvider,
     IFeatureFlagProvider featureFlagProvider,
     ICurrentUserProvider currentUserProvider,
     IClock clock)
 {
     _courseService               = courseService ?? throw new ArgumentNullException(nameof(courseService));
     _sqlQueryDispatcher          = sqlQueryDispatcher;
     _apprenticeshipSettings      = apprenticeshipSettings ?? throw new ArgumentNullException(nameof(apprenticeshipSettings));
     _standardsAndFrameworksCache = standardsAndFrameworksCache ?? throw new ArgumentNullException(nameof(standardsAndFrameworksCache));
     _providerInfoCache           = providerInfoCache;
     _providerContextProvider     = providerContextProvider;
     _featureFlagProvider         = featureFlagProvider;
     _currentUserProvider         = currentUserProvider;
     _clock = clock;
 }
 public StandardModelBinder(IStandardsCache standardsAndFrameworksCache)
 {
     _standardsAndFrameworksCache = standardsAndFrameworksCache;
 }
 public Handler(IStandardsCache standardsAndFrameworksCache)
 {
     _standardsAndFrameworksCache = standardsAndFrameworksCache;
 }