Esempio n. 1
0
        /// <summary>
        /// Use BSON for subscription serialization.
        /// </summary>
        /// <param name="cfg"></param>
        /// <returns></returns>
        public static MessageBusConfiguration WithBsonSubscriptionSerializer(this MessageBusConfiguration cfg)
        {
            IDocumentSerializer serializer = new BsonNetDocumentSerializer();

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

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