示例#1
0
 public OrderAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Order> bulkRepository,
     IBulkRepository <Order.FirmOrganizationUnitMismatch> invalidFirmRepository,
     IBulkRepository <Order.InvalidFirm> orderInvalidFirmRepository,
     IBulkRepository <Order.PartnerPosition> partnerPositionRepository,
     IBulkRepository <Order.PremiumPartnerPosition> premiumPartnerPositionRepository,
     IBulkRepository <Order.FmcgCutoutPosition> fmcgCutoutPositionRepository,
     IBulkRepository <Order.AddressAdvertisementNonOnTheMap> addressAdvertisementRepository,
     IBulkRepository <Order.MissingValidPartnerFirmAddresses> missingValidPartnerFirmAddressesRepository,
     IBulkRepository <Order.InvalidFirmAddress> orderInvalidFirmAddressRepository,
     IBulkRepository <Order.InvalidCategory> invalidCategoryRepository,
     IBulkRepository <Order.CategoryNotBelongsToAddress> categoryNotBelongsToAddress)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new OrderAccessor(query),
                   bulkRepository,
                   HasValueObject(new OrderFirmOrganizationUnitMismatchAccessor(query), invalidFirmRepository),
                   HasValueObject(new OrderInvalidFirmAccessor(query), orderInvalidFirmRepository),
                   HasValueObject(new PartnerPositionAccessor(query), partnerPositionRepository),
                   HasValueObject(new PremiumPartnerPositionAccessor(query), premiumPartnerPositionRepository),
                   HasValueObject(new FmcgCutoutPositionAccessor(query), fmcgCutoutPositionRepository),
                   HasValueObject(new AddressAdvertisementNonOnTheMapAccessor(query), addressAdvertisementRepository),
                   HasValueObject(new MissingValidPartnerFirmAddressesAccessor(query), missingValidPartnerFirmAddressesRepository),
                   HasValueObject(new InvalidFirmAddressAccessor(query), orderInvalidFirmAddressRepository),
                   HasValueObject(new InvalidCategoryAccessor(query), invalidCategoryRepository),
                   HasValueObject(new CategoryNotBelongsToAddressAccessor(query), categoryNotBelongsToAddress));
 }
示例#2
0
 public StatisticsProcessor(StatisticsRecalculationMetadata <T, StatisticsKey> metadata, IQuery query, IBulkRepository <T> repository, IEqualityComparerFactory equalityComparerFactory)
 {
     _repository = repository;
     _metadata   = metadata;
     _equalityComparerFactory = equalityComparerFactory;
     _changesDetector         = new DataChangesDetector <T>(_metadata.MapSpecificationProviderForSource, _metadata.MapSpecificationProviderForTarget, _equalityComparerFactory.CreateCompleteComparer <T>(), query);
 }
 protected EntityActorBase(IQuery query,
                           IBulkRepository <TDataObject> bulkRepository,
                           IEqualityComparerFactory equalityComparerFactory,
                           IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor)
     : this(query, bulkRepository, equalityComparerFactory, storageBasedDataObjectAccessor, new NullDataChangesHandler <TDataObject>())
 {
 }
示例#4
0
 public OrderAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Order> bulkRepository,
     IBulkRepository <Order.BargainSignedLaterThanOrder> orderBargainSignedLaterThanOrderRepository,
     IBulkRepository <Order.HasNoAnyLegalPersonProfile> orderHasNoAnyLegalPersonProfileRepository,
     IBulkRepository <Order.HasNoAnyPosition> orderHasNoAnyPositionRepository,
     IBulkRepository <Order.InactiveReference> inactiveReferenceRepository,
     IBulkRepository <Order.InvalidBillsTotal> orderInvalidBillsTotalRepository,
     IBulkRepository <Order.LegalPersonProfileBargainExpired> orderLegalPersonProfileBargainEndDateIsEarlierThanOrderSignupDateRepository,
     IBulkRepository <Order.LegalPersonProfileWarrantyExpired> orderLegalPersonProfileWarrantyEndDateIsEarlierThanOrderSignupDateRepository,
     IBulkRepository <Order.MissingBargainScan> orderMissingBargainScanRepository,
     IBulkRepository <Order.MissingBills> orderMissingBillsRepository,
     IBulkRepository <Order.MissingRequiredField> orderMissingRequiredFieldRepository,
     IBulkRepository <Order.MissingOrderScan> orderMissingOrderScanRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new OrderAccessor(query), bulkRepository,
                   HasValueObject(new OrderBargainSignedLaterThanOrderAccessor(query), orderBargainSignedLaterThanOrderRepository),
                   HasValueObject(new OrderHasNoAnyLegalPersonProfileAccessor(query), orderHasNoAnyLegalPersonProfileRepository),
                   HasValueObject(new OrderHasNoAnyPositionAccessor(query), orderHasNoAnyPositionRepository),
                   HasValueObject(new InactiveReferenceAccessor(query), inactiveReferenceRepository),
                   HasValueObject(new OrderInvalidBillsTotalAccessor(query), orderInvalidBillsTotalRepository),
                   HasValueObject(new LegalPersonProfileBargainExpiredAccessor(query), orderLegalPersonProfileBargainEndDateIsEarlierThanOrderSignupDateRepository),
                   HasValueObject(new LegalPersonProfileWarrantyExpiredAccessor(query), orderLegalPersonProfileWarrantyEndDateIsEarlierThanOrderSignupDateRepository),
                   HasValueObject(new OrderMissingBargainScanAccessor(query), orderMissingBargainScanRepository),
                   HasValueObject(new OrderMissingBillsAccessor(query), orderMissingBillsRepository),
                   HasValueObject(new MissingRequiredFieldAccessor(query), orderMissingRequiredFieldRepository),
                   HasValueObject(new OrderMissingOrderScanAccessor(query), orderMissingOrderScanRepository));
 }
示例#5
0
 protected AggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory)
 {
     _query = query;
     _equalityComparerFactory = equalityComparerFactory;
 }
 // TODO {all, 15.09.2015}: Имеет смысл избавить *Processor от зависимостей IQuery, I*Info, заменить на DataChangesDetector
 public ValueObjectProcessor(ValueObjectMetadataElement <T> metadata, IQuery query, IBulkRepository <T> repository, IEqualityComparerFactory equalityComparerFactory)
 {
     _metadata   = metadata;
     _repository = repository;
     _equalityComparerFactory = equalityComparerFactory;
     _changesDetector         = new DataChangesDetector <T, T>(_metadata.MapSpecificationProviderForSource, _metadata.MapSpecificationProviderForTarget, query);
 }
 public IdentityChangesProvider(IQuery query,
                                IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor,
                                IEqualityComparerFactory equalityComparerFactory)
 {
     _query = query;
     _storageBasedDataObjectAccessor = storageBasedDataObjectAccessor;
     _identityComparer = equalityComparerFactory.CreateIdentityComparer <TDataObject>();
 }
示例#8
0
 public EntityChangesProvider(IQuery query,
                              IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor,
                              IEqualityComparerFactory equalityComparerFactory)
 {
     _query = query;
     _storageBasedDataObjectAccessor = storageBasedDataObjectAccessor;
     _dataChangesDetector            = new TwoPhaseDataChangesDetector <TDataObject>(equalityComparerFactory);
 }
示例#9
0
 public ValueObjectActor(
     IQuery query,
     IBulkRepository <TDataObject> bulkRepository,
     IEqualityComparerFactory equalityComparerFactory,
     IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor)
     : this(new EntityChangesProvider <TDataObject>(query, storageBasedDataObjectAccessor, equalityComparerFactory), bulkRepository, new NullDataChangesHandler <TDataObject>())
 {
 }
 public IdentityInMemoryChangesProvider(IQuery query,
                                        IMemoryBasedDataObjectAccessor <TDataObject> memoryBasedDataObjectAccessor,
                                        IEqualityComparerFactory equalityComparerFactory)
 {
     _query = query;
     _memoryBasedDataObjectAccessor = memoryBasedDataObjectAccessor;
     _identityComparer = equalityComparerFactory.CreateIdentityComparer <TDataObject>();
 }
示例#11
0
 public EntityActor(
     IQuery query,
     IBulkRepository <TEntity> bulkRepository,
     IEqualityComparerFactory equalityComparerFactory,
     IStorageBasedDataObjectAccessor <TEntity> storageBasedDataObjectAccessor,
     IDataChangesHandler <TEntity> dataChangesHandler,
     IReadOnlyCollection <IActor> valueObjectActors)
     : base(query, bulkRepository, equalityComparerFactory, storageBasedDataObjectAccessor, dataChangesHandler) =>
示例#12
0
 public PeriodAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Period> bulkRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new PeriodAccessor(query), bulkRepository);
 }
示例#13
0
 public EntityInMemoryChangesProvider(IQuery query,
                                      IMemoryBasedDataObjectAccessor <TDataObject> memoryBasedDataObjectAccessor,
                                      IEqualityComparerFactory equalityComparerFactory)
 {
     _query = query;
     _memoryBasedDataObjectAccessor = memoryBasedDataObjectAccessor;
     _dataChangesDetector           = new TwoPhaseDataChangesDetector <TDataObject>(equalityComparerFactory);
 }
 public Pipeline(IReadOnlyCollection <Type> factAccessorTypes, IReadOnlyCollection <Type> aggregateAccessorTypes, IReadOnlyCollection <Type> messageAccessorTypes, IEqualityComparerFactory equalityComparerFactory, MappingSchema webAppMappingSchema)
 {
     _factAccessorTypes       = factAccessorTypes;
     _aggregateAccessorTypes  = aggregateAccessorTypes;
     _messageAccessorTypes    = messageAccessorTypes;
     _equalityComparerFactory = equalityComparerFactory;
     _webAppMappingSchema     = webAppMappingSchema;
     _strategy = new OverOptimizedPipelineStrategy(); // new OptimizedPipelineStrategy();
 }
示例#15
0
 public SyncEntityNameActor(IQuery query,
                            IBulkRepository <EntityName> bulkRepository,
                            IEqualityComparerFactory equalityComparerFactory)
 {
     _query            = query;
     _bulkRepository   = bulkRepository;
     _identityComparer = equalityComparerFactory.CreateIdentityComparer <EntityName>();
     _completeComparer = equalityComparerFactory.CreateCompleteComparer <EntityName>();
 }
 public FirmAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Firm> bulkRepository,
     IBulkRepository <Firm.CategoryPurchase> categoryPurchaseRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new FirmAccessor(query), bulkRepository,
                   HasValueObject(new CategoryPurchaseAccessor(query), categoryPurchaseRepository));
 }
 public ValueObjectChangesProvider(IQuery query,
                                   IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor,
                                   IEqualityComparerFactory equalityComparerFactory)
 {
     _storageBasedDataObjectAccessor = storageBasedDataObjectAccessor;
     _dataChangesDetector            = new DataChangesDetector <TDataObject>(
         specification => storageBasedDataObjectAccessor.GetSource().WhereMatched(specification),
         specification => query.For <TDataObject>().WhereMatched(specification),
         equalityComparerFactory.CreateCompleteComparer <TDataObject>());
 }
示例#18
0
 public OrderAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Order> bulkRepository,
     IBulkRepository <Order.OrderTheme> orderThemeBulkRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new OrderAccessor(query), bulkRepository,
                   HasValueObject(new OrderThemeAccessor(query), orderThemeBulkRepository));
 }
示例#19
0
 protected EntityActorBase(IQuery query,
                           IBulkRepository <TDataObject> bulkRepository,
                           IEqualityComparerFactory equalityComparerFactory,
                           IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor,
                           IDataChangesHandler <TDataObject> dataChangesHandler)
     : this(new CreateDataObjectsActor <TDataObject>(new IdentityChangesProvider <TDataObject>(query, storageBasedDataObjectAccessor, equalityComparerFactory), bulkRepository, dataChangesHandler),
            new SyncDataObjectsActor <TDataObject>(new EntityChangesProvider <TDataObject>(query, storageBasedDataObjectAccessor, equalityComparerFactory), bulkRepository, dataChangesHandler),
            new DeleteDataObjectsActor <TDataObject>(new IdentityChangesProvider <TDataObject>(query, storageBasedDataObjectAccessor, equalityComparerFactory), bulkRepository, dataChangesHandler))
 {
 }
 public ThemeAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Theme> bulkRepository,
     IBulkRepository <Theme.InvalidCategory> invalidCategoryBulkRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new ThemeAccessor(query), bulkRepository,
                   HasValueObject(new InvalidCategoryAccessor(query), invalidCategoryBulkRepository));
 }
 public ProjectAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Project> bulkRepository,
     IBulkRepository <Project.ProjectDefaultTheme> projectDefaultThemeBulkRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new ProjectAccessor(query), bulkRepository,
                   HasValueObject(new ProjectDefaultThemeAccessor(query), projectDefaultThemeBulkRepository));
 }
示例#22
0
 public SyncEntityNameActor(IQuery query,
                            ITenantProvider tenantProvider,
                            IBulkRepository <EntityName> bulkRepository,
                            IEqualityComparerFactory equalityComparerFactory)
 {
     _query               = query;
     _tenantProvider      = tenantProvider;
     _bulkRepository      = bulkRepository;
     _dataChangesDetector = new TwoPhaseDataChangesDetector <EntityName>(equalityComparerFactory);
 }
 public RulesetAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Ruleset> bulkRepository,
     IBulkRepository <Ruleset.AdvertisementAmountRestriction> advertisementAmountRestrictionBulkRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new RulesetAccessor(query), bulkRepository,
                   HasValueObject(new AdvertisementAmountRestrictionAccessor(query), advertisementAmountRestrictionBulkRepository));
 }
 public AccountAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Account> accountBulkRepository,
     IBulkRepository <Account.AccountPeriod> accountPeriodBulkRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new AccountAccessor(query), accountBulkRepository,
                   HasValueObject(new AccountPeriodAccessor(query), accountPeriodBulkRepository));
 }
示例#25
0
 public OrderAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Order> orderBulkRepository,
     IBulkRepository <Order.DebtPermission> debtPermissionBulkRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new OrderAccessor(query), orderBulkRepository,
                   HasValueObject(new DebtPermissionAccessor(query), debtPermissionBulkRepository));
 }
 public OrderAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Order> bulkRepository,
     IBulkRepository <Order.CategoryAdvertisement> categoryAdvertisementRepository,
     IBulkRepository <Order.CostPerClickAdvertisement> costPerClickAdvertisementRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new OrderAccessor(query), bulkRepository,
                   HasValueObject(new CategoryAdvertisementAccessor(query), categoryAdvertisementRepository),
                   HasValueObject(new CostPerClickAdvertisementAccessor(query), costPerClickAdvertisementRepository));
 }
示例#27
0
        public PersistentTableStoreFactory(IEqualityComparerFactory equalityComparerFactory,
                                           MappingSchema webAppMappingSchema, IDataConnectionProvider connectionProvider)
        {
            _equalityComparerFactory = equalityComparerFactory;

            _connection = connectionProvider.CreateVrConnection()
                          .AddMappingSchema(webAppMappingSchema);

            // чтобы параллельные запуски single-проверок не накладывали блокировки на webapp-таблицы и не ждали друг друга
            // запускаем single-проверки в транзакции с режимом snapshot, который не накладывает никаких блокировок
            _connection.BeginTransaction(System.Data.IsolationLevel.Snapshot);
        }
示例#28
0
 public FirmAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository<Firm> firmRepository,
     IBulkRepository<Firm.FirmPosition> firmPositionRepository,
     IBulkRepository<Firm.FirmAssociatedPosition> firmAssociatedPositionRepository,
     IBulkRepository<Firm.FirmDeniedPosition> firmDeniedPositionRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new FirmAccessor(query), firmRepository,
         HasValueObject(new FirmPositionAccessor(query), firmPositionRepository),
         HasValueObject(new FirmAssociatedPositionAccessor(query), firmAssociatedPositionRepository),
         HasValueObject(new FirmDeniedPositionAccessor(query), firmDeniedPositionRepository));
 }
示例#29
0
 public OrderAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Order> repository,
     IBulkRepository <Order.MissingAdvertisementReference> missingAdvertisementReferenceRepository,
     IBulkRepository <Order.MissingOrderPositionAdvertisement> missingOrderPositionAdvertisementRepository,
     IBulkRepository <Order.AdvertisementNotBelongToFirm> advertisementNotBelongToFirmRepository,
     IBulkRepository <Order.AdvertisementFailedReview> advertisementFailedReviewRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new OrderAccessor(query), repository,
                   HasValueObject(new MissingAdvertisementReferenceAccessor(query), missingAdvertisementReferenceRepository),
                   HasValueObject(new MissingOrderPositionAdvertisementAccessor(query), missingOrderPositionAdvertisementRepository),
                   HasValueObject(new AdvertisementNotBelongToFirmAccessor(query), advertisementNotBelongToFirmRepository),
                   HasValueObject(new AdvertisementFailedReviewAccessor(query), advertisementFailedReviewRepository));
 }
 public ProjectAggregateRootActor(
     IQuery query,
     IEqualityComparerFactory equalityComparerFactory,
     IBulkRepository <Project> bulkRepository,
     IBulkRepository <Project.Category> categoryRepository,
     IBulkRepository <Project.CostPerClickRestriction> costPerClickRestrictionRepository,
     IBulkRepository <Project.SalesModelRestriction> salesModelRestrictionRepository,
     IBulkRepository <Project.NextRelease> nextReleaseRepository)
     : base(query, equalityComparerFactory)
 {
     HasRootEntity(new ProjectAccessor(query), bulkRepository,
                   HasValueObject(new CategoryAccessor(query), categoryRepository),
                   HasValueObject(new CostPerClickRestrictionAccessor(query), costPerClickRestrictionRepository),
                   HasValueObject(new SalesModelRestrictionAccessor(query), salesModelRestrictionRepository),
                   HasValueObject(new NextReleaseAccessor(query), nextReleaseRepository));
 }
 public PropertyMergeManagerTests()
 {
     _equalityComparerFactory = new PropertyEqualityComparerFactory();
 }
 public FieldMergeManagerTests()
 {
     _equalityComparerFactory = new FieldEqualityComparerFactory();
 }