示例#1
0
文件: Program.cs 项目: zonaid/ncqrs
        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);
        }
        public void SetUp()
        {
            var typeResolver = new AttributeEventTypeResolver();

            typeResolver.AddEvent(typeof(AnEvent));
            _typeResolver = typeResolver;
        }
示例#3
0
        public JsonEventFormatterTests()
        {
            var typeResolver = new AttributeEventTypeResolver();

            typeResolver.AddEvent(typeof(AnEvent));
            _typeResolver = typeResolver;
        }