public FlowModelInitializer( ICosmosDbQueryDispatcher cosmosDbQueryDispatcher, ISqlQueryDispatcher sqlDbQueryDispatcher, IStandardsAndFrameworksCache standardsAndFrameworksCache) { _cosmosDbQueryDispatcher = cosmosDbQueryDispatcher; _sqlDbQueryDispatcher = sqlDbQueryDispatcher; _standardsAndFrameworksCache = standardsAndFrameworksCache; }
public ApprenticeshipsController( ICourseService courseService, ICosmosDbQueryDispatcher cosmosDbQueryDispatcher, IOptions <ApprenticeshipSettings> apprenticeshipSettings, IStandardsAndFrameworksCache standardsAndFrameworksCache, IProviderContextProvider providerContextProvider) { _courseService = courseService ?? throw new ArgumentNullException(nameof(courseService)); _cosmosDbQueryDispatcher = cosmosDbQueryDispatcher ?? throw new ArgumentNullException(nameof(cosmosDbQueryDispatcher)); _apprenticeshipSettings = apprenticeshipSettings ?? throw new ArgumentNullException(nameof(apprenticeshipSettings)); _standardsAndFrameworksCache = standardsAndFrameworksCache ?? throw new ArgumentNullException(nameof(standardsAndFrameworksCache)); _providerContextProvider = providerContextProvider; }
public static async Task <IReadOnlyCollection <OneOf <Standard, Framework> > > SearchStandardsAndFrameworks( this IStandardsAndFrameworksCache cache, string search) { var frameworkSearchResults = await SearchFrameworks(cache, search); var standardsSearchResults = await SearchStandards(cache, search); return(frameworkSearchResults.Select(OneOf <Standard, Framework> .FromT1) .Union(standardsSearchResults.Select(OneOf <Standard, Framework> .FromT0)) .OrderBy(t => t.Match(s => s.StandardName, f => f.NasTitle)) .ToList()); }
public static async Task <IReadOnlyCollection <Standard> > SearchStandards( this IStandardsAndFrameworksCache 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()); }
public StandardModelBinder(IStandardsAndFrameworksCache standardsAndFrameworksCache) { _standardsAndFrameworksCache = standardsAndFrameworksCache; }
public Handler(IStandardsAndFrameworksCache standardsAndFrameworksCache) { _standardsAndFrameworksCache = standardsAndFrameworksCache; }