Пример #1
0
 public AppRedisCacheStore(
     IMemoryStore memoryStore,
     IRedisStore redisStore,
     IMutilCacheStore mutilCacheStore)
 {
     _memoryStore     = memoryStore;
     _redisStore      = redisStore;
     _mutilCacheStore = mutilCacheStore;
 }
Пример #2
0
 public RstBrandModelParser(
     IMemoryStore memoryStore,
     IUnitOfWork unitOfWork,
     IVehicleTypeParser vehicleTypeParser,
     ILogger <RstBrandModelParser> logger)
 {
     _memoryStore       = memoryStore;
     _unitOfWork        = unitOfWork;
     _vehicleTypeParser = vehicleTypeParser;
     _logger            = logger;
 }
Пример #3
0
        // TODO: Handle task expiration

        /// <summary>
        /// Create a Redis backed task manager
        /// </summary>
        /// <param name="memoryManager">The memory manager to use</param>
        /// <param name="taskGroupName">The name of the task group. This is used namespace different groups of tasks.</param>
        /// <param name="taskExpiry">The task expiry.</param>
        public TaskManager(IDistributedMemoryManager memoryManager, string taskGroupName, TimeSpan?taskExpiry = null)
        {
            if (!memoryManager.IsConnected)
            {
                memoryManager.Connect();
            }

            _memoryStore   = memoryManager.GetMemoryStore();
            _taskGroupName = taskGroupName;
            _taskExpiry    = taskExpiry ?? DefaultTaskExpiry;
        }
Пример #4
0
        public ParserProvider(
            IUnitOfWork unitOfWork,
            IMemoryStore memoryStore,
            IBodyTypeParser bodyTypeParser,
            ICarConditionParser carConditionParser,
            IDataLoader dataLoader,
            IDescriptionParser descriptionParser,
            IDriveUnitParser driveUnitParser,
            IEngineVolumetricParser engineVolumetricParser,
            IFuelTypeParser fuelTypeParser,
            IImageLinkParser imageLinkParser,
            IStructureExtractor structureExtractor,
            IMileageParser mileageParser,
            IBrandModelParser brandModelParser,
            IOfferNumberParser offerNumberParser,
            IPriceParser priceParser,
            IPublishDateParser publishDateParser,
            IRegionParser regionParser,
            ISourceLinkParser sourceLinkParser,
            ITransmissionTypeParser transmissionType,
            IVehicleTypeParser vehicleTypeParser,
            IYearParser yearParser
            )
        {
            UnitOfWork             = unitOfWork;
            MemoryStore            = memoryStore;
            BodyTypeParser         = bodyTypeParser;
            CarConditionParser     = carConditionParser;
            DescriptionParser      = descriptionParser;
            DriveUnitParser        = driveUnitParser;
            DataLoader             = dataLoader;
            EngineVolumetricParser = engineVolumetricParser;
            FuelTypeParser         = fuelTypeParser;
            ImageLinkParser        = imageLinkParser;
            StructureExtractor     = structureExtractor;
            MileageParser          = mileageParser;
            BrandModelParser       = brandModelParser;
            OfferNumberParser      = offerNumberParser;
            PriceParser            = priceParser;
            PublishDateParser      = publishDateParser;
            RegionParser           = regionParser;
            SourceLinkParser       = sourceLinkParser;
            TransmissionTypeParser = transmissionType;
            VehicleTypeParser      = vehicleTypeParser;
            YearParser             = yearParser;

            ScrappingPage = 1;
        }
Пример #5
0
 public RstParserProvider(
     ILogger <RstParserProvider> logger,
     IUnitOfWork unitOfWork,
     IMemoryStore memoryStore,
     IDataLoader dataLoader,
     IDescriptionParser descriptionParser,
     IDriveUnitParser driveUnitParser,
     IBodyTypeParser bodyTypeParser,
     ICarConditionParser carConditionParser,
     IEngineVolumetricParser engineVolumetricParser,
     IFuelTypeParser fuelTypeParser,
     IImageLinkParser imageLinkParser,
     IStructureExtractor structureExtractor,
     IMileageParser mileageParser,
     IBrandModelParser brandModelParser,
     IOfferNumberParser offerNumberParser,
     IPriceParser priceParser,
     IPublishDateParser publishDateParser,
     IRegionParser regionParser,
     ISourceLinkParser sourceLinkParser,
     ITransmissionTypeParser transmissionType,
     IVehicleTypeParser vehicleTypeParser,
     IYearParser yearParser)
     : base(unitOfWork,
            memoryStore,
            bodyTypeParser,
            carConditionParser,
            dataLoader,
            descriptionParser,
            driveUnitParser,
            engineVolumetricParser,
            fuelTypeParser,
            imageLinkParser,
            structureExtractor,
            mileageParser,
            brandModelParser,
            offerNumberParser,
            priceParser,
            publishDateParser,
            regionParser,
            sourceLinkParser,
            transmissionType,
            vehicleTypeParser,
            yearParser)
 {
     _logger = logger;
 }
Пример #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RedisCache{TKey, TValue}" /> class.
        /// </summary>
        /// <param name="innerCache">The inner cache.</param>
        /// <param name="cacheName">Name of the cache.</param>
        /// <param name="compressKey">if set to <c>true</c> [compress key].</param>
        /// <param name="compressValue">if set to <c>true</c> [compress value].</param>
        /// <param name="keyExpiry">The key expiry.</param>
        /// <exception cref="System.ArgumentNullException">innerCache</exception>
        public RedisCache(ICache <TKey, TValue> innerCache, string cacheName, bool compressKey = false, bool compressValue = false, TimeSpan?keyExpiry = null)
        {
            if (string.IsNullOrEmpty(cacheName))
            {
                throw new ArgumentNullException("cacheName");
            }

            InnerCache    = innerCache;
            CacheName     = cacheName;
            CompressKey   = compressKey;
            CompressValue = compressValue;
            KeyExpiry     = keyExpiry;

            var memoryManager = Factory.Current.Resolve <IDistributedMemoryManager>( );

            _memoryStore = memoryManager.GetMemoryStore( );
        }
Пример #7
0
        public MutilCacheStore(IMemoryStore memoryStore, IRedisStore redisStore)
        {
            _memoryStore = memoryStore;
            _redisStore  = redisStore;

            _subscribeObject = _redisStore.Client.Subscribe((TOPIC_NAME, (msg) =>
            {
                if (msg == null || string.IsNullOrEmpty(msg.Body))
                {
                    return;
                }

                var message = msg.Body.ToObject <CacheMessage>();
                if (message == null)
                {
                    return;
                }

                OnMessage(message);
            }
                                                             ));
        }
Пример #8
0
 public ClaimsController(IMemoryStore repo)
 {
     db = repo;
 }
 public PasswordController(IMemoryStore memoryStore, ILogger <PasswordController> logger)
 {
     _memoryStore = memoryStore;
     _logger      = logger;
 }
Пример #10
0
 public RstRegionParser(IMemoryStore memoryStore)
 {
     _memoryStore = memoryStore;
 }
Пример #11
0
 public AppMemoryCacheStore(IMemoryStore memoryStore)
 {
     _memroyStore = memoryStore;
 }
 public ValuesProcessor(IPermanentStore permanentStore, IMemoryStore memoryStore)
 {
     _permanentStore = permanentStore;
     _memoryStore    = memoryStore;
 }
Пример #13
0
 public QuotesController(IMemoryStore repo)
 {
     db = repo;
 }
Пример #14
0
 public ShareController(IMemoryStore memoryStore, IHttpContextAccessor httpContextAccessor)
 {
     _memoryStore         = memoryStore;
     _httpContextAccessor = httpContextAccessor;
 }
Пример #15
0
 public RulesEngine(IMemoryStore memoryStore)
 {
     _memoryStore = memoryStore;
 }
Пример #16
0
 public RstBodyTypeParser(IMemoryStore memoryStore)
 {
     _memoryStore = memoryStore;
 }