Ejemplo n.º 1
0
 public ProductCatalog(
     ICacheState cache,
     IRepository<Category> categoriesRepository,
     IRepository<Product> productsRepository)
 {
     _cache = cache;
     _productsRepository = productsRepository;
     _categoriesRepository = categoriesRepository;
 }
Ejemplo n.º 2
0
 public ProductCatalog(
     ICacheState cache,
     IRepository <Category> categoriesRepository,
     IRepository <Product> productsRepository)
 {
     _cache = cache;
     _productsRepository   = productsRepository;
     _categoriesRepository = categoriesRepository;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Default Constructor.
 /// Creates a new instance of <see cref="IState"/> class.
 /// </summary>
 /// <param name="applicationState">An instance of <see cref="IApplicationState"/> that is used to store
 /// application state data.</param>
 /// <param name="localState">An instance of <see cref="ILocalState"/> that is used to store local
 /// state data.</param>
 /// <param name="sessionState">An instance of <see cref="ISessionState"/> that is used to store session
 /// state data.</param>
 /// <param name="cacheState">An instance of <see cref="ICacheState"/> that is used to store cache
 /// state data.</param>
 public State(
     IApplicationState applicationState, 
     ILocalState localState, 
     ISessionState sessionState, 
     ICacheState cacheState)
 {
     _applicationState = applicationState;
     _localState = localState;
     _sessionState = sessionState;
     _cacheState = cacheState;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Default Constructor.
 /// Creates a new instance of <see cref="IState"/> class.
 /// </summary>
 /// <param name="applicationState">An instance of <see cref="IApplicationState"/> that is used to store
 /// application state data.</param>
 /// <param name="localState">An instance of <see cref="ILocalState"/> that is used to store local
 /// state data.</param>
 /// <param name="sessionState">An instance of <see cref="ISessionState"/> that is used to store session
 /// state data.</param>
 /// <param name="cacheState">An instance of <see cref="ICacheState"/> that is used to store cache
 /// state data.</param>
 public State(
     IApplicationState applicationState,
     ILocalState localState,
     ISessionState sessionState,
     ICacheState cacheState)
 {
     _applicationState = applicationState;
     _localState       = localState;
     _sessionState     = sessionState;
     _cacheState       = cacheState;
 }
 public TargetModule(
     ISystemClock systemClock,
     IExceptionHandler exceptionHandler,
     IConsoleWrapper <TargetModule> consoleWrapper,
     ICacheState <DateTimeOffset> cacheState,
     ITargetTypeService targetTypeService,
     ITargetService targetService,
     IDeploymentCache deploymentCache)
     : base(exceptionHandler)
 {
     ActionDictionary.Add(builder => builder
                          .Add("add", AddTarget)
                          .Add("list", ListTargets));
     WriteLineAsyncAction   = (format, args, logLevel) => consoleWrapper.WriteLineAsync(format, true, logLevel, args);
     DefaultAction          = GetTarget;
     RequiresArguments      = true;
     this.systemClock       = systemClock;
     this.consoleWrapper    = consoleWrapper;
     this.cacheState        = cacheState;
     this.targetTypeService = targetTypeService;
     this.targetService     = targetService;
     this.deploymentCache   = deploymentCache;
 }
Ejemplo n.º 6
0
 public void init()
 {
     this._cacheState = new AppFabricCache();
     //this._cacheState = new HttpRuntimeCache();
     this._cacheWraper = new CacheWraper(this._cacheState);
 }
Ejemplo n.º 7
0
 public void init()
 {
     this._cacheState = new AppFabricCache();
     this._cacheWraper = new CacheWraper(this._cacheState);
 }
Ejemplo n.º 8
0
 public CacheWraper(ICacheState CacheState)
 {
     this.CacheState = CacheState;
 }