/// <summary>
 /// Creates generic processor that calls messages updaters and sends output to provided deledate.
 /// </summary>
 /// <param name="processor">writer of service messages objects</param>
 /// <param name="generator">flow id generator that is called to create next flowId</param>
 /// <param name="updaters">service message updaters, i.e. timestamp updater</param>
 public FlowServiceMessageWriter([NotNull] IServiceMessageProcessor processor,
                                 [NotNull] IFlowIdGenerator generator,
                                 [NotNull] IEnumerable <IServiceMessageUpdater> updaters)
 {
     myProcessor = processor;
     myGenerator = generator;
     myUpdaters  = IncludeFlowId(updaters);
 }
 /// <summary>
 /// Most specific constructor. Could be used with DI
 /// </summary>
 public TeamCityServiceMessages([NotNull] IServiceMessageFormatter formatter,
                                [NotNull] IFlowIdGenerator flowIdGenerator,
                                [NotNull] IEnumerable <IServiceMessageUpdater> updaters)
 {
     Formatter       = formatter;
     FlowIdGenerator = flowIdGenerator;
     Updaters        = updaters;
 }
 /// <summary>
 /// Creates generic processor that calls messages updaters and sends output to provided deledate.
 /// </summary>
 /// <param name="processor">writer of service messages objects</param>
 /// <param name="generator">flow id generator that is called to create next flowId</param>
 /// <param name="updaters">service message updaters, i.e. timestamp updater</param>
 public FlowServiceMessageWriter([NotNull] IServiceMessageProcessor processor,
                                 [NotNull] IFlowIdGenerator generator,
                                 [NotNull] IEnumerable <IServiceMessageUpdater> updaters)
 {
     if (processor == null)
     {
         throw new ArgumentNullException(nameof(processor));
     }
     if (generator == null)
     {
         throw new ArgumentNullException(nameof(generator));
     }
     if (updaters == null)
     {
         throw new ArgumentNullException(nameof(updaters));
     }
     _processor = processor;
     _generator = generator;
     _updaters  = IncludeFlowId(updaters);
 }
Beispiel #4
0
 /// <summary>
 /// Most specific constructor. Could be used with DI
 /// </summary>
 public TeamCityServiceMessages(
     [NotNull] IServiceMessageFormatter formatter,
     [NotNull] IFlowIdGenerator flowIdGenerator,
     [NotNull] IEnumerable <IServiceMessageUpdater> updaters)
 {
     if (formatter == null)
     {
         throw new ArgumentNullException(nameof(formatter));
     }
     if (flowIdGenerator == null)
     {
         throw new ArgumentNullException(nameof(flowIdGenerator));
     }
     if (updaters == null)
     {
         throw new ArgumentNullException(nameof(updaters));
     }
     Formatter       = formatter;
     FlowIdGenerator = flowIdGenerator;
     Updaters        = updaters;
 }
 /// <summary>
 /// Creates flow id from given generator instance
 /// </summary>
 /// <param name="flowId"></param>
 public FlowMessageUpdater([NotNull] IFlowIdGenerator flowId) : this(flowId.NewFlowId())
 {
 }