Exemplo n.º 1
0
 public AppRedisCacheStore(
     IMemoryStore memoryStore,
     IRedisStore redisStore,
     IMutilCacheStore mutilCacheStore)
 {
     _memoryStore     = memoryStore;
     _redisStore      = redisStore;
     _mutilCacheStore = mutilCacheStore;
 }
Exemplo n.º 2
0
 public RstBrandModelParser(
     IMemoryStore memoryStore,
     IUnitOfWork unitOfWork,
     IVehicleTypeParser vehicleTypeParser,
     ILogger <RstBrandModelParser> logger)
 {
     _memoryStore       = memoryStore;
     _unitOfWork        = unitOfWork;
     _vehicleTypeParser = vehicleTypeParser;
     _logger            = logger;
 }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
 }
Exemplo n.º 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( );
        }
Exemplo n.º 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);
            }
                                                             ));
        }
Exemplo n.º 8
0
 public ClaimsController(IMemoryStore repo)
 {
     db = repo;
 }
 public PasswordController(IMemoryStore memoryStore, ILogger <PasswordController> logger)
 {
     _memoryStore = memoryStore;
     _logger      = logger;
 }
Exemplo n.º 10
0
 public RstRegionParser(IMemoryStore memoryStore)
 {
     _memoryStore = memoryStore;
 }
Exemplo n.º 11
0
 public AppMemoryCacheStore(IMemoryStore memoryStore)
 {
     _memroyStore = memoryStore;
 }
 public ValuesProcessor(IPermanentStore permanentStore, IMemoryStore memoryStore)
 {
     _permanentStore = permanentStore;
     _memoryStore    = memoryStore;
 }
Exemplo n.º 13
0
 public QuotesController(IMemoryStore repo)
 {
     db = repo;
 }
Exemplo n.º 14
0
 public ShareController(IMemoryStore memoryStore, IHttpContextAccessor httpContextAccessor)
 {
     _memoryStore         = memoryStore;
     _httpContextAccessor = httpContextAccessor;
 }
Exemplo n.º 15
0
 public RulesEngine(IMemoryStore memoryStore)
 {
     _memoryStore = memoryStore;
 }
Exemplo n.º 16
0
 public RstBodyTypeParser(IMemoryStore memoryStore)
 {
     _memoryStore = memoryStore;
 }