public TargetingTypeGroupRepository ClaimTargetingTypeGroupRepository(IOnDemand <IDataManager> ondemandManager, Func <TargetingTypeRepository> ondemandTargetingTypeRepository)
 {
     return(this.targetingTypeGroupRepositoryStorage.Claim(TargetingTypeGroupRepositoryStorageKey, delegate
     {
         return this.CreateTargetingTypeGroupRepository(ondemandManager.Claim(), ondemandTargetingTypeRepository());
     }));
 }
예제 #2
0
 public IssuerRepository ClaimIssuerRepository(IOnDemand <IDataManager> ondemandManager)
 {
     return(this.issuerRepositoryStorage.Claim(IssuerRepositoryStorageKey, delegate
     {
         var manager = ondemandManager.Claim();
         return this.CreateIssuerRepository(manager);
     }));
 }
예제 #3
0
 public CountryRepository ClaimCountryRepository(IOnDemand <IDataManager> ondemandManager)
 {
     return(this.countryRepositoryStorage.Claim(CountryRepositoryStorageKey, delegate
     {
         var manager = ondemandManager.Claim();
         return this.CreateCountryRepository(manager);
     }));
 }
예제 #4
0
        public BenchmarkRepository ClaimBenchmarkRepository(IOnDemand <IDataManager> ondemandManager, DateTime timestamp)
        {
            var stored = this.benchmarkRepositoryStorage[BenchmarkManagerCacheKey];

            if (stored == null)
            {
                stored = new BenchmarkRepository(timestamp, ondemandManager.Claim());
                this.benchmarkRepositoryStorage[BenchmarkManagerCacheKey] = stored;
            }
            else if (stored.Timestamp == timestamp)
            {
                // do nothing
            }
            else
            {
                stored = new BenchmarkRepository(timestamp, ondemandManager.Claim());
                this.benchmarkRepositoryStorage[BenchmarkManagerCacheKey] = stored;
            }
            return(stored);
        }
예제 #5
0
 public TaxonomyRepository ClaimTaxonomyRepository(
     IOnDemand <IDataManager> ondemandManager,
     BasketRepository basketRepository,
     CountryRepository countryRepository
     )
 {
     return(this.taxonomyRepositoryStorage.Claim(TaxonomyRepositoryStorageKey, delegate
     {
         return this.CreateTaxonomyRepository(ondemandManager.Claim(), basketRepository, countryRepository);
     }));
 }
예제 #6
0
 public SecurityRepository ClaimSecurityRepository(
     IOnDemand <IDataManager> ondemandManager,
     Func <CountryRepository> ondemandCountryRepository
     )
 {
     return(this.securityRepositoryStorage.Claim(SecurityManagerCacheKey, delegate
     {
         var securities = ondemandManager.Claim().GetAllSecurities();
         var repository = this.CreateSecurityRepository(ondemandCountryRepository, securities);
         return repository;
     }));
 }
예제 #7
0
 public BasketRepository ClaimBasketRepository(
     IOnDemand <IDataManager> ondemandManager,
     Func <CountryRepository> ondemandCountryRepository,
     IMonitor monitor
     )
 {
     return(this.basketRepositoryStorage.Claim(BasketRepositoryStorageKey, delegate
     {
         return this.CreateBasketRepository(
             ondemandManager.Claim(),
             ondemandCountryRepository(),
             monitor
             );
     }));
 }
예제 #8
0
 public TaxonomyRepository ClaimTaxonomyRepository(
     IOnDemand <IDataManager> ondemandManager,
     Func <BasketRepository> ondemandBasketRepository,
     Func <CountryRepository> ondemandCountryRepository
     )
 {
     return(this.taxonomyRepositoryStorage.Claim(TaxonomyRepositoryStorageKey, delegate
     {
         return this.CreateTaxonomyRepository(
             ondemandManager.Claim(),
             ondemandBasketRepository(),
             ondemandCountryRepository()
             );
     }));
 }
 public TargetingTypeRepository ClaimTargetingTypeRepository(
     IOnDemand <IDataManager> ondemandManager,
     TaxonomyRepository taxonomyRepository,
     PortfolioRepository portfolioRepository
     )
 {
     return(this.targetingTypeRepositoryStorage.Claim(TargetingTypeRepositoryStorageKey, delegate
     {
         return this.CreateTargetingTypeRepository(
             ondemandManager.Claim(),
             taxonomyRepository,
             portfolioRepository
             );
     }));
 }
예제 #10
0
 public PortfolioRepository ClaimPortfolioRepository(
     IOnDemand <IDataManager> ondemandManager,
     Func <SecurityRepository> ondemandSecurityRepository
     )
 {
     return(this.portfolioRepositoryStorage.Claim(PortfolioRepositoryStorageKey, delegate
     {
         var manager = ondemandManager.Claim();
         var portfolioInfos = manager.GetAllPortfolios();
         var result = new PortfolioRepository(
             portfolioInfos,
             ondemandSecurityRepository()
             );
         return result;
     }));
 }
예제 #11
0
 public BasketRepository ClaimBasketRepository(
     IOnDemand <IDataManager> ondemandManager,
     CountryRepository countryRepository,
     IMonitor monitor
     )
 {
     return(this.basketRepositoryStorage.Claim(BasketRepositoryStorageKey, delegate
     {
         var manager = ondemandManager.Claim();
         return this.CreateBasketRepository(
             manager,
             countryRepository,
             monitor
             );
     }));
 }