private void Set(Func <IConfigureUpconverter, IBuildConfiguration> upconverterSetup)
        {
            if (isAlreadySetup)
            {
                return;
            }
            streamInfoContainer.ResetToNew();

            var upconverterConfig = Configuration.Begin()
                                    .WithDefaultCollection()
                                    .WithDefaultStateFactory()
                                    .WithInterceptor(interceptorContext)
                                    .NeverUseThreadSafe()
                                    .WithNoEventPublisher()
                                    .WithAnyAppliersFrom(Assembly.GetExecutingAssembly())
                                    .AndNoMoreAppliers();

            var configuration = upconverterSetup(upconverterConfig)
                                .Build();

            var tempInMemRepo    = new InMemoryEventSourcedRepository <int, IHoldHigherOrder>(configuration);
            var defaultValidator = tempInMemRepo.StateValidator;

            passThroughValidator.CurrentValidator = defaultValidator;

            sessionContainer.Setup(passThroughValidator, configuration);
            isAlreadySetup = true;
        }
Пример #2
0
        public void Setup()
        {
            var configuration = Configuration.Begin()
                                .WithDefaultCollection()
                                .WithDefaultStateFactory()
                                .NeverUseThreadSafe()
                                .WithNoEventPublisher()
                                .WithAnyAppliersFrom(Assembly.GetExecutingAssembly())
                                .AndNoMoreAppliers()
                                .WithNoUpconverters()
                                .Build();

            streamInfoContainer.ResetToNew();
            neventStoreContainer.Setup(configuration);

            sessionContainer.Setup(configuration);
        }
Пример #3
0
        private void Set(Func <IConfigureUpconverter, IBuildConfiguration> upconverterSetup)
        {
            if (isAlreadySetup)
            {
                return;
            }
            streamInfoContainer.ResetToNew();

            var upconverterConfig = Configuration.Begin()
                                    .WithDefaultCollection()
                                    .WithDefaultStateFactory()
                                    .WithInterceptor(interceptorContext)
                                    .NeverUseThreadSafe()
                                    .WithNoEventPublisher()
                                    .WithAnyAppliersFrom(Assembly.GetExecutingAssembly())
                                    .AndNoMoreAppliers();

            var configuration = upconverterSetup(upconverterConfig)
                                .Build();

            sessionContainer.Setup(configuration);
            isAlreadySetup = true;
        }