public TargetingTypeGroupRepository ClaimTargetingTypeGroupRepository(IOnDemand <IDataManager> ondemandManager, Func <TargetingTypeRepository> ondemandTargetingTypeRepository) { return(this.targetingTypeGroupRepositoryStorage.Claim(TargetingTypeGroupRepositoryStorageKey, delegate { return this.CreateTargetingTypeGroupRepository(ondemandManager.Claim(), ondemandTargetingTypeRepository()); })); }
public IssuerRepository ClaimIssuerRepository(IOnDemand <IDataManager> ondemandManager) { return(this.issuerRepositoryStorage.Claim(IssuerRepositoryStorageKey, delegate { var manager = ondemandManager.Claim(); return this.CreateIssuerRepository(manager); })); }
public CountryRepository ClaimCountryRepository(IOnDemand <IDataManager> ondemandManager) { return(this.countryRepositoryStorage.Claim(CountryRepositoryStorageKey, delegate { var manager = ondemandManager.Claim(); return this.CreateCountryRepository(manager); })); }
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); }
public TaxonomyRepository ClaimTaxonomyRepository( IOnDemand <IDataManager> ondemandManager, BasketRepository basketRepository, CountryRepository countryRepository ) { return(this.taxonomyRepositoryStorage.Claim(TaxonomyRepositoryStorageKey, delegate { return this.CreateTaxonomyRepository(ondemandManager.Claim(), basketRepository, countryRepository); })); }
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; })); }
public BasketRepository ClaimBasketRepository( IOnDemand <IDataManager> ondemandManager, Func <CountryRepository> ondemandCountryRepository, IMonitor monitor ) { return(this.basketRepositoryStorage.Claim(BasketRepositoryStorageKey, delegate { return this.CreateBasketRepository( ondemandManager.Claim(), ondemandCountryRepository(), monitor ); })); }
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 ); })); }
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; })); }
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 ); })); }