Ejemplo n.º 1
0
 public PersistableCatalog(
     IInMemoryCollection <T> collection,
     IPersistentSource <T> source,
     List <PersistencyOperations> supportedOperations,
     KeyManagementStrategyType keyManagementStrategy = KeyManagementStrategyType.CollectionDecides)
     : base(collection, source, supportedOperations, keyManagementStrategy)
 {
 }
Ejemplo n.º 2
0
 protected PersistableCatalogAsync(
     IInMemoryCollection <TDomainData> collection,
     IPersistentSource <TPersistentData> source,
     List <PersistencyOperations> supportedOperations)
     : base(collection, source, supportedOperations)
 {
     _persistentSource = source;
 }
Ejemplo n.º 3
0
 protected Catalog(
     IInMemoryCollection <T> collection,
     IDataSourceCRUD <TDTO> source,
     List <PersistencyOperations> supportedOperations)
 {
     _collection          = collection;
     _source              = source;
     _supportedOperations = supportedOperations;
 }
Ejemplo n.º 4
0
 protected PersistableCatalog(
     IInMemoryCollection <T> collection,
     IPersistentSource <TDTO> source,
     List <PersistencyOperations> supportedOperations)
     : base(collection, source, supportedOperations)
 {
     _persistentSource = source;
     Manage();
 }
Ejemplo n.º 5
0
 protected PersistableCatalogFull(
     IInMemoryCollection <TDomainData> collection,
     IPersistentSource <TPersistentData> source,
     List <PersistencyOperations> supportedOperations,
     KeyManagementStrategyType keyManagementStrategy = KeyManagementStrategyType.CollectionDecides)
     : base(collection, source, supportedOperations, keyManagementStrategy)
 {
     _persistentSource = source;
 }
 public PersistableCatalog(
     IInMemoryCollection <T> collection,
     IPersistentSource <TDTO> source,
     IFactory <T, TVMO> vmFactory,
     IFactory <T, TDTO> dtoFactory,
     List <PersistencyOperations> supportedOperations)
     : base(collection, source, vmFactory, dtoFactory, supportedOperations)
 {
     Manage();
 }
Ejemplo n.º 7
0
 protected CatalogFull(
     IInMemoryCollection <T> collection,
     IDataSourceCRUD <TPersistentData> source,
     List <PersistencyOperations> supportedOperations,
     KeyManagementStrategyType keyManagementStrategy = KeyManagementStrategyType.CollectionDecides)
 {
     _collection            = collection;
     _source                = source;
     _supportedOperations   = supportedOperations;
     _keyManagementStrategy = keyManagementStrategy;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CartController"/> class.
 /// </summary>
 /// <param name="logger">The logger to use.</param>
 /// <param name="dataSource">The database to use.</param>
 /// <param name="cartFactory">The cart factory to use.</param>
 /// <param name="priceList">The price list holding the list of <see cref="Sku"/> and their prices.</param>
 /// <param name="promotionPipeline">The pipeline to use.</param>
 public CartController(ILogger <CartController> logger,
                       IInMemoryCollection <CartsCollection.CartsCollectionEntry> dataSource,
                       ICartFactory cartFactory,
                       IDictionary <Sku, decimal> priceList,
                       IPromotionPipeline promotionPipeline)
 {
     this.logger            = logger;
     this.dataSource        = dataSource ?? throw new ArgumentNullException(nameof(dataSource));
     this.cartFactory       = cartFactory ?? throw new ArgumentNullException(nameof(cartFactory));
     this.priceList         = priceList ?? throw new ArgumentNullException(nameof(priceList));
     this.promotionPipeline = promotionPipeline ?? throw new ArgumentNullException(nameof(promotionPipeline));
 }
Ejemplo n.º 9
0
 public Catalog(
     IInMemoryCollection <T> collection,
     IPersistentSource <TDTO> source,
     IFactory <T, TVMO> vmoFactory,
     IFactory <T, TDTO> dtoFactory,
     List <PersistencyOperations> supportedOperations)
 {
     _collection          = collection;
     _source              = source;
     _vmoFactory          = vmoFactory;
     _dtoFactory          = dtoFactory;
     _supportedOperations = supportedOperations;
 }
Ejemplo n.º 10
0
 public StudentRepository(IInMemoryCollection <Student> studentCollection)
 {
     _studentCollection = studentCollection;
 }