public FundingSummaryReport(
            IDateTimeProvider dateTimeProvider,
            IValueProvider valueProvider,
            IStreamableKeyValuePersistenceService storage,
            IILRService ilrService,
            ISupplementaryDataService supplementaryDataService,
            IList <IRowHelper> rowHelpers,
            IReferenceDataCache referenceDataCache,
            IExcelStyleProvider excelStyleProvider,
            IVersionInfo versionInfo)
            : base(dateTimeProvider, valueProvider)
        {
            _dateTimeProvider         = dateTimeProvider;
            _storage                  = storage;
            _rowHelpers               = rowHelpers;
            _referenceDataCache       = referenceDataCache;
            _excelStyleProvider       = excelStyleProvider;
            _versionInfo              = versionInfo;
            _supplementaryDataService = supplementaryDataService;
            _ilrService               = ilrService;

            ReportFileName         = "ESF Funding Summary Report";
            _fundingSummaryMapper  = new FundingSummaryMapper();
            _cachedModelProperties = _fundingSummaryMapper
                                     .MemberMaps
                                     .OrderBy(x => x.Data.Index)
                                     .Select(x => new ModelProperty(x.Data.Names.Names.ToArray(), (PropertyInfo)x.Data.Member))
                                     .ToArray();
        }
 public FcsCodeMappingHelper(
     IReferenceDataCache repository,
     ILogger logger)
 {
     _cache  = repository;
     _logger = logger;
 }
 public DeliverableCodeRule02(
     IReferenceDataCache referenceDataCache,
     IFcsCodeMappingHelper mappingHelper)
 {
     _referenceDataCache = referenceDataCache;
     _mappingHelper      = mappingHelper;
 }
 public CalendarYearCalendarMonthRule02(
     IReferenceDataCache referenceDataCache,
     IFcsCodeMappingHelper mappingHelper)
 {
     _referenceDataCache = referenceDataCache;
     _mappingHelper      = mappingHelper;
 }
Ejemplo n.º 5
0
 public ReferenceDataService(
     IReferenceDataRepository referenceDataRepository,
     IReferenceDataCache referenceDataCache,
     IFCSRepository fcsRepository)
 {
     _referenceDataRepository = referenceDataRepository;
     _referenceDataCache      = referenceDataCache;
     _fcsRepository           = fcsRepository;
 }
Ejemplo n.º 6
0
 public PopulationService(
     IValidationErrorMessageCache validationCache,
     IReferenceDataCache cache,
     IFcsCodeMappingHelper mappingHelper)
 {
     _cache           = cache;
     _mappingHelper   = mappingHelper;
     _validationCache = validationCache;
 }
Ejemplo n.º 7
0
 public PopulationService(
     IReferenceDataCache cache,
     IFcsCodeMappingHelper mappingHelper,
     ILogger logger)
 {
     _cache         = cache;
     _logger        = logger;
     _mappingHelper = mappingHelper;
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Load the collection for in-memory managed cache.
        /// </summary>
        /// <typeparam name="TColl">The <see cref="ReferenceDataCollectionBase{TItem}"/> <see cref="Type"/> of the the collection.</typeparam>
        /// <typeparam name="TItem">The <see cref="ReferenceDataBase"/> <see cref="Type"/> for the collection.</typeparam>
        /// <param name="owner">The owning <see cref="IReferenceDataCache{TColl, TItem}"/>.</param>
        /// <param name="loadCollection">The specified function to load the collection from the data repository.</param>
        /// <returns>The collection from the data repository.</returns>
        public virtual Task <TColl> LoadAsync <TColl, TItem>(IReferenceDataCache <TColl, TItem> owner, Func <Task <TColl> > loadCollection)
            where TColl : ReferenceDataCollectionBase <TItem>, IReferenceDataCollection, new()
            where TItem : ReferenceDataBase, new()
        {
            Check.NotNull(owner, nameof(owner));
            Check.NotNull(loadCollection, nameof(loadCollection));

            return(loadCollection());
        }
Ejemplo n.º 9
0
        public static IReferenceDataCollection GetCollection(Type type)
        {
            if (!cacheDict.ContainsKey(Check.NotNull(type, nameof(type))))
            {
                throw new ArgumentException(string.Format("Type {0} does not exist within the ReferenceDataDataSvc cache.", type.Name));
            }

            IReferenceDataCache rdc = (IReferenceDataCache)cacheDict[type];

            return(rdc.GetCollection());
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Load the collection for in-memory managed cache.
        /// </summary>
        /// <typeparam name="TColl">The <see cref="ReferenceDataCollectionBase{TItem}"/> <see cref="Type"/> of the the collection.</typeparam>
        /// <typeparam name="TItem">The <see cref="ReferenceDataBase"/> <see cref="Type"/> for the collection.</typeparam>
        /// <param name="owner">The owning <see cref="IReferenceDataCache{TColl, TItem}"/>.</param>
        /// <param name="loadCollection">The specified function to load the collection from the data repository.</param>
        /// <returns>The collection from the data repository.</returns>
        public virtual async Task <TColl> LoadAsync <TColl, TItem>(IReferenceDataCache <TColl, TItem> owner, Func <Task <TColl> > loadCollection)
            where TColl : ReferenceDataCollectionBase <TItem>, IReferenceDataCollection, new()
            where TItem : ReferenceDataBase, new()
        {
            Check.NotNull(owner, nameof(owner));
            Check.NotNull(loadCollection, nameof(loadCollection));

            var sw   = Stopwatch.StartNew();
            var coll = await loadCollection().ConfigureAwait(false);

            sw.Stop();
            Logger.Create <ReferenceDataCacheLoader>().LogDebug("ReferenceData Cache Type '{CacheName}' loaded with {Count} item(s) on Thread {Thread} [{Elapsed}ms].", typeof(TItem).Name, coll.Count, Environment.CurrentManagedThreadId, sw.ElapsedMilliseconds);
            return(coll);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Load the collection for in-memory managed cache.
        /// </summary>
        /// <typeparam name="TColl">The <see cref="ReferenceDataCollectionBase{TItem}"/> <see cref="Type"/> of the the collection.</typeparam>
        /// <typeparam name="TItem">The <see cref="ReferenceDataBase"/> <see cref="Type"/> for the collection.</typeparam>
        /// <param name="owner">The owning <see cref="IReferenceDataCache{TColl, TItem}"/>.</param>
        /// <param name="loadCollection">The specified function to load the collection from the data repository.</param>
        /// <returns>The collection from the data repository.</returns>
        public virtual async Task <TColl> LoadAsync <TColl, TItem>(IReferenceDataCache <TColl, TItem> owner, Func <Task <TColl> > loadCollection)
            where TColl : ReferenceDataCollectionBase <TItem>, IReferenceDataCollection, new()
            where TItem : ReferenceDataBase, new()
        {
            Check.NotNull(owner, nameof(owner));
            Check.NotNull(loadCollection, nameof(loadCollection));

            var sw   = Stopwatch.StartNew();
            var coll = await loadCollection().ConfigureAwait(false);

            sw.Stop();
            Logger.Create <ReferenceDataCacheLoader>().LogInformation("ReferenceData Cache Type '{0}' loaded with {1} items on thread '{2}' in {3}ms.", typeof(TItem).Name, coll.Count, Thread.CurrentThread.ManagedThreadId, sw.ElapsedMilliseconds);
            return(coll);
        }
Ejemplo n.º 12
0
        public static IReferenceDataCollection GetCollection(Type type)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            if (!cacheDict.ContainsKey(type))
            {
                throw new ArgumentException($"Type {type.Name} does not exist within the ReferenceDataDataSvc cache.", nameof(type));
            }

            IReferenceDataCache rdc = (IReferenceDataCache)cacheDict[type];

            return(rdc.GetCollection());
        }
        public AimAndDeliverableReport(
            IDateTimeProvider dateTimeProvider,
            IStreamableKeyValuePersistenceService storage,
            IReferenceDataCache referenceDataCache,
            IValidRepository validRepository,
            IFM70Repository fm70Repository,
            IValueProvider valueProvider,
            IAimAndDeliverableComparer comparer)
            : base(dateTimeProvider, valueProvider)
        {
            _storage            = storage;
            _referenceDataCache = referenceDataCache;
            _validRepository    = validRepository;
            _fm70Repository     = fm70Repository;
            _comparer           = comparer as AimAndDeliverableComparer;

            ReportFileName = "ESF Aim and Deliverable Report";
        }
 public OrganisationReferenceDataService(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Load the collection for in-memory managed cache.
 /// </summary>
 /// <typeparam name="TColl">The <see cref="ReferenceDataCollectionBase{TItem}"/> <see cref="Type"/> of the the collection.</typeparam>
 /// <typeparam name="TItem">The <see cref="ReferenceDataBase"/> <see cref="Type"/> for the collection.</typeparam>
 /// <param name="owner">The owning <see cref="IReferenceDataCache{TColl, TItem}"/>.</param>
 /// <param name="loadCollection">The specified function to load the collection from the data repository.</param>
 /// <returns>The collection from the data repository.</returns>
 public virtual Task <TColl> Load <TColl, TItem>(IReferenceDataCache <TColl, TItem> owner, Func <Task <TColl> > loadCollection)
     where TColl : ReferenceDataCollectionBase <TItem>, IReferenceDataCollection, new()
     where TItem : ReferenceDataBase, new()
 {
     return(loadCollection());
 }
Ejemplo n.º 16
0
        private IPostcodeFactorsReferenceDataService MockTestObject(IReferenceDataCache @object)
        {
            IPostcodeFactorsReferenceDataService postcodeFactorsReferenceDataService = new PostcodeFactorsReferenceDataService(@object);

            return(postcodeFactorsReferenceDataService);
        }
 public ULNRule02(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }
Ejemplo n.º 18
0
 public ULNReferenceDataService(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }
Ejemplo n.º 19
0
 public LARSNotionalNVQLevelData(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }
        private ILARSReferenceDataService MockTestObject(IReferenceDataCache @object)
        {
            ILARSReferenceDataService larsReferenceDataService = new LARSReferenceDataService(@object);

            return(larsReferenceDataService);
        }
 public LARSFrameworkAimComponentTypeRefData(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }
 public LARSCategoryRefData(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }
 public ULNRefData(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }
 public PostcodeFactorsReferenceDataService(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }
 public LARSReferenceDataService(IReferenceDataCache referenceDataCache)
 {
     _referenceDataCache = referenceDataCache;
 }