public ReferenceDataAgentProvider(IReferenceDataAgent agent) { _agent = Beef.Check.NotNull(agent, nameof(agent)); _nameDict.Add(nameof(Country), typeof(RefDataNamespace.Country)); _typeDict.Add(typeof(RefDataNamespace.Country), nameof(Country)); _cacheDict.Add(typeof(RefDataNamespace.Country), new ReferenceDataCache <RefDataNamespace.CountryCollection, RefDataNamespace.Country>(() => _agent.CountryGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(USState), typeof(RefDataNamespace.USState)); _typeDict.Add(typeof(RefDataNamespace.USState), nameof(USState)); _cacheDict.Add(typeof(RefDataNamespace.USState), new ReferenceDataCache <RefDataNamespace.USStateCollection, RefDataNamespace.USState>(() => _agent.USStateGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(Gender), typeof(RefDataNamespace.Gender)); _typeDict.Add(typeof(RefDataNamespace.Gender), nameof(Gender)); _cacheDict.Add(typeof(RefDataNamespace.Gender), new ReferenceDataCache <RefDataNamespace.GenderCollection, RefDataNamespace.Gender>(() => _agent.GenderGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(EyeColor), typeof(RefDataNamespace.EyeColor)); _typeDict.Add(typeof(RefDataNamespace.EyeColor), nameof(EyeColor)); _cacheDict.Add(typeof(RefDataNamespace.EyeColor), new ReferenceDataCache <RefDataNamespace.EyeColorCollection, RefDataNamespace.EyeColor>(() => _agent.EyeColorGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(PowerSource), typeof(RefDataNamespace.PowerSource)); _typeDict.Add(typeof(RefDataNamespace.PowerSource), nameof(PowerSource)); _cacheDict.Add(typeof(RefDataNamespace.PowerSource), new ReferenceDataCache <RefDataNamespace.PowerSourceCollection, RefDataNamespace.PowerSource>(() => _agent.PowerSourceGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(Company), typeof(RefDataNamespace.Company)); _typeDict.Add(typeof(RefDataNamespace.Company), nameof(Company)); _cacheDict.Add(typeof(RefDataNamespace.Company), new ReferenceDataCache <RefDataNamespace.CompanyCollection, RefDataNamespace.Company>(() => _agent.CompanyGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); }
public ReferenceDataAgentProvider(IReferenceDataAgent agent) { _agent = Beef.Check.NotNull(agent, nameof(agent)); _nameDict.Add(nameof(OpenStatus), typeof(RefDataNamespace.OpenStatus)); _typeDict.Add(typeof(RefDataNamespace.OpenStatus), nameof(OpenStatus)); _cacheDict.Add(typeof(RefDataNamespace.OpenStatus), new ReferenceDataCache <RefDataNamespace.OpenStatusCollection, RefDataNamespace.OpenStatus>(() => _agent.OpenStatusGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(ProductCategory), typeof(RefDataNamespace.ProductCategory)); _typeDict.Add(typeof(RefDataNamespace.ProductCategory), nameof(ProductCategory)); _cacheDict.Add(typeof(RefDataNamespace.ProductCategory), new ReferenceDataCache <RefDataNamespace.ProductCategoryCollection, RefDataNamespace.ProductCategory>(() => _agent.ProductCategoryGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(AccountUType), typeof(RefDataNamespace.AccountUType)); _typeDict.Add(typeof(RefDataNamespace.AccountUType), nameof(AccountUType)); _cacheDict.Add(typeof(RefDataNamespace.AccountUType), new ReferenceDataCache <RefDataNamespace.AccountUTypeCollection, RefDataNamespace.AccountUType>(() => _agent.AccountUTypeGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(MaturityInstructions), typeof(RefDataNamespace.MaturityInstructions)); _typeDict.Add(typeof(RefDataNamespace.MaturityInstructions), nameof(MaturityInstructions)); _cacheDict.Add(typeof(RefDataNamespace.MaturityInstructions), new ReferenceDataCache <RefDataNamespace.MaturityInstructionsCollection, RefDataNamespace.MaturityInstructions>(() => _agent.MaturityInstructionsGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(TransactionType), typeof(RefDataNamespace.TransactionType)); _typeDict.Add(typeof(RefDataNamespace.TransactionType), nameof(TransactionType)); _cacheDict.Add(typeof(RefDataNamespace.TransactionType), new ReferenceDataCache <RefDataNamespace.TransactionTypeCollection, RefDataNamespace.TransactionType>(() => _agent.TransactionTypeGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(TransactionStatus), typeof(RefDataNamespace.TransactionStatus)); _typeDict.Add(typeof(RefDataNamespace.TransactionStatus), nameof(TransactionStatus)); _cacheDict.Add(typeof(RefDataNamespace.TransactionStatus), new ReferenceDataCache <RefDataNamespace.TransactionStatusCollection, RefDataNamespace.TransactionStatus>(() => _agent.TransactionStatusGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); }
public ReferenceDataAgentProvider(IReferenceDataAgent agent) { _agent = Beef.Check.NotNull(agent, nameof(agent)); _nameDict.Add(nameof(Gender), typeof(RefDataNamespace.Gender)); _typeDict.Add(typeof(RefDataNamespace.Gender), nameof(Gender)); _cacheDict.Add(typeof(RefDataNamespace.Gender), new ReferenceDataCache <RefDataNamespace.GenderCollection, RefDataNamespace.Gender>(() => _agent.GenderGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(TerminationReason), typeof(RefDataNamespace.TerminationReason)); _typeDict.Add(typeof(RefDataNamespace.TerminationReason), nameof(TerminationReason)); _cacheDict.Add(typeof(RefDataNamespace.TerminationReason), new ReferenceDataCache <RefDataNamespace.TerminationReasonCollection, RefDataNamespace.TerminationReason>(() => _agent.TerminationReasonGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(RelationshipType), typeof(RefDataNamespace.RelationshipType)); _typeDict.Add(typeof(RefDataNamespace.RelationshipType), nameof(RelationshipType)); _cacheDict.Add(typeof(RefDataNamespace.RelationshipType), new ReferenceDataCache <RefDataNamespace.RelationshipTypeCollection, RefDataNamespace.RelationshipType>(() => _agent.RelationshipTypeGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(USState), typeof(RefDataNamespace.USState)); _typeDict.Add(typeof(RefDataNamespace.USState), nameof(USState)); _cacheDict.Add(typeof(RefDataNamespace.USState), new ReferenceDataCache <RefDataNamespace.USStateCollection, RefDataNamespace.USState>(() => _agent.USStateGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); _nameDict.Add(nameof(PerformanceOutcome), typeof(RefDataNamespace.PerformanceOutcome)); _typeDict.Add(typeof(RefDataNamespace.PerformanceOutcome), nameof(PerformanceOutcome)); _cacheDict.Add(typeof(RefDataNamespace.PerformanceOutcome), new ReferenceDataCache <RefDataNamespace.PerformanceOutcomeCollection, RefDataNamespace.PerformanceOutcome>(() => _agent.PerformanceOutcomeGetAllAsync().ContinueWith((t) => t.Result.Value, TaskScheduler.Current))); ReferenceDataAgentProviderCtor(); }