public MessageRepeater(IRepeatStrategy repeatStrategy, ISystemTime systemTime, IMessageCache messageCache) { Contract.Requires(repeatStrategy != null); Contract.Requires(systemTime != null); Contract.Requires(messageCache != null); this.repeatStrategy = repeatStrategy; this.systemTime = systemTime; this.messageCache = messageCache; Messenger.Register<MessagingInitialising>(_ => FirstRepeat()); }
public static ProcessorBuilder<MessagePayload> ToMessageRepeater( this ProcessorBuilder<MessagePayload> builder, IMessageCache messageCache, ISystemTime systemTime, ITaskRepeater taskRepeater, IRepeatStrategy strategy) { var repeater = new MessageRepeater(strategy, systemTime, messageCache); taskRepeater.Register(TimeSpan.FromSeconds(1), repeater.Repeat); return builder.ToProcessor(repeater); }
public void SetMessageRepeatingStrategy(IRepeatStrategy strategy) { Contract.Requires(strategy != null); sendSchema.RepeatStrategy = strategy; }