예제 #1
0
 public ProductCatalog(
     ICacheState cache,
     IRepository<Category> categoriesRepository,
     IRepository<Product> productsRepository)
 {
     _cache = cache;
     _productsRepository = productsRepository;
     _categoriesRepository = categoriesRepository;
 }
예제 #2
0
 public ProductCatalog(
     ICacheState cache,
     IRepository <Category> categoriesRepository,
     IRepository <Product> productsRepository)
 {
     _cache = cache;
     _productsRepository   = productsRepository;
     _categoriesRepository = categoriesRepository;
 }
예제 #3
0
파일: State.cs 프로젝트: CSharpDev/Dev.All
 /// <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;
 }
예제 #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;
 }
예제 #6
0
 public void init()
 {
     this._cacheState = new AppFabricCache();
     //this._cacheState = new HttpRuntimeCache();
     this._cacheWraper = new CacheWraper(this._cacheState);
 }
예제 #7
0
 public void init()
 {
     this._cacheState = new AppFabricCache();
     this._cacheWraper = new CacheWraper(this._cacheState);
 }
예제 #8
0
 public CacheWraper(ICacheState CacheState)
 {
     this.CacheState = CacheState;
 }