public SetPartitionKeyMessageSendTopology(IMessagePartitionKeyFormatter <T> partitionKeyFormatter)
        {
            if (partitionKeyFormatter == null)
            {
                throw new ArgumentNullException(nameof(partitionKeyFormatter));
            }

            _filter = new Proxy(new SetPartitionKeyFilter <T>(partitionKeyFormatter));
        }
 public SetPartitionKeyFilter(IMessagePartitionKeyFormatter <T> partitionKeyFormatter)
 {
     _partitionKeyFormatter = partitionKeyFormatter;
 }
Example #3
0
 public void SetFormatter(IMessagePartitionKeyFormatter <TMessage> formatter)
 {
     _formatter = formatter;
 }
Example #4
0
 public void SetFormatter(IPartitionKeyFormatter formatter)
 {
     _formatter = new MessagePartitionKeyFormatter <TMessage>(formatter);
 }
 /// <summary>
 /// Use the partition key formatter for the specified message type
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="configurator"></param>
 /// <param name="formatter"></param>
 public static void UsePartitionKeyFormatter <T>(this ISendTopologyConfigurator configurator, IMessagePartitionKeyFormatter <T> formatter)
     where T : class
 {
     configurator.GetMessageTopology <T>().UsePartitionKeyFormatter(formatter);
 }
        public static void UsePartitionKeyFormatter <T>(this IMessageSendTopologyConfigurator <T> configurator, IMessagePartitionKeyFormatter <T> formatter)
            where T : class
        {
            configurator.UpdateConvention <IPartitionKeyMessageSendTopologyConvention <T> >(
                update =>
            {
                update.SetFormatter(formatter);

                return(update);
            });
        }