Exemple #1
0
        public InMemoryFabric(ITransitionRunner transitionRunner,
                              IInMemoryFabricSerializerFactoryAdvisor serializerFactoryAdvisor)
        {
            _transitionRunner = transitionRunner;
            DataStore         = InMemoryDataStore.Create(ScheduleMessage);
            var serializerFactory = serializerFactoryAdvisor.Advise();

            _serializationFormat = serializerFactory.Format;
            Serializer           = serializerFactory.Create();
            Connector            = new InMemoryFabricConnector(DataStore, Serializer, _serializationFormat);
        }
        public InMemoryFabric(ITransitionRunner transitionRunner,
                              IInMemoryFabricSerializerFactoryAdvisor serializerFactoryAdvisor,
                              IUniqueIdGenerator numericIdGenerator,
                              IServiceProviderScope serviceProviderScope)
        {
            _transitionRunner     = transitionRunner;
            _uniqueIdGenerator    = numericIdGenerator;
            _serviceProviderScope = serviceProviderScope;

            DataStore = InMemoryDataStore.Create(ScheduleMessage);
            var serializerFactory = serializerFactoryAdvisor.Advise();

            _serializationFormat = serializerFactory.Format;
            Serializer           = serializerFactory.Create();
            Connector            = new InMemoryFabricConnector(DataStore, Serializer, _serializationFormat);
        }