示例#1
0
        /// <summary>
        /// Use JSON for subscription serialization.
        /// </summary>
        /// <param name="cfg"></param>
        /// <returns></returns>
        public static MessageBusConfiguration WithJsonSubscriptionSerializer(this MessageBusConfiguration cfg)
        {
            IDocumentSerializer serializer = new JsonNetDocumentSerializer();

            Xyperico.Agres.MessageBus.MessageBusConfigurationExtensions.SetSubscriptionSerializer(cfg, serializer);
            return(cfg);
        }
        /// <summary>
        /// Use JSON for document serialization.
        /// </summary>
        /// <param name="cfg"></param>
        /// <returns></returns>
        public static EventStoreConfiguration WithJsonDocumentSerializer(this EventStoreConfiguration cfg)
        {
            IDocumentSerializer serializer = new JsonNetDocumentSerializer();

            Xyperico.Agres.EventStore.EventStoreConfigurationExtensions.SetDocumentSerializer(cfg, serializer);
            return(cfg);
        }