Esempio n. 1
0
        private static IEventStore InitializeEventStore()
        {
            var typeResolver = new AttributeEventTypeResolver();
            typeResolver.AddAllEventsInAssembly(typeof(Program).Assembly);

            var eventStore = new MsSqlServerEventStore(ConfigurationManager.ConnectionStrings["EventStore"].ConnectionString, typeResolver, null);
            return eventStore;
        }
Esempio n. 2
0
 private static IEventStore InitializeEventStore()
 {
     var typeResolver = new AttributeEventTypeResolver();
     typeResolver.AddEvent(typeof(NameChangedEvent));
     typeResolver.AddEvent(typeof(PersonCreatedEvent)); 
     
     var eventStore = new MsSqlServerEventStore(ConfigurationManager.ConnectionStrings["EventStore"].ConnectionString, typeResolver, null);
     return eventStore;
 }
Esempio n. 3
0
        private static IEventStore InitializeEventStore()
        {
            var typeResolver = new AttributeEventTypeResolver();
            typeResolver.AddAllEventsInAssembly(typeof(Program).Assembly);

            var converter = new EventConverter(typeResolver);
            converter.AddConverter(typeof(NameChangedEvent), new NameChangedEventPostConverter());
            converter.AddConverter(typeof(PersonCreatedEvent), new PersonCreatedEventPostConverter());

            var eventStore = new MsSqlServerEventStore(ConfigurationManager.ConnectionStrings["EventStore"].ConnectionString, typeResolver, converter);
            return eventStore;
        }
 public void SetUp()
 {
     var typeResolver = new AttributeEventTypeResolver();
     typeResolver.AddEvent(typeof(AnEvent));
     _typeResolver = typeResolver;
 }
 public void Setup()
 {
     resolver = new AttributeEventTypeResolver();
 }
 public AttributeEventTypeResolverTests()
 {
     resolver = new AttributeEventTypeResolver();
 }
Esempio n. 7
0
 public JsonEventFormatterTests()
 {
     var typeResolver = new AttributeEventTypeResolver();
     typeResolver.AddEvent(typeof(AnEvent));
     _typeResolver = typeResolver;
 }