コード例 #1
0
        public DefaultEventDataFormatterTests()
        {
            var typeNameRegistry =
                new TypeNameRegistry()
                .Map(typeof(MyEvent), "Event")
                .Map(typeof(MyOldEvent), "OldEvent");

            sut = new DefaultEventDataFormatter(typeNameRegistry, JsonHelper.CreateSerializer(typeNameRegistry));
        }
コード例 #2
0
        public DefaultEventDataFormatterTests()
        {
            serializerSettings.Converters.Add(new PropertiesBagConverter <EnvelopeHeaders>());

            typeNameRegistry.Map(typeof(MyEvent), "Event");
            typeNameRegistry.Map(typeof(MyOldEvent), "OldEvent");

            sut = new DefaultEventDataFormatter(typeNameRegistry, JsonSerializer.Create(serializerSettings));
        }