public TransformData(ILogger <TransformData> logger, AsyncActionSubscriptionFactory subscriptionFactory, PublisherFactory publisherFactory) { if (logger is null) { throw new ArgumentNullException(nameof(logger)); } if (subscriptionFactory is null) { throw new ArgumentNullException(nameof(subscriptionFactory)); } if (publisherFactory is null) { throw new ArgumentNullException(nameof(publisherFactory)); } var pattern = new PatternBuilder("playground") .With("data") .With("rng") .Build(); this.subscription = subscriptionFactory.Create(pattern, this.TransformAsync); this.publisher = publisherFactory.Create(); this.logger = logger; }
public SaveData(ILogger <SaveData> logger, AsyncActionSubscriptionFactory subscriptionFactory) { if (logger is null) { throw new ArgumentNullException(nameof(logger)); } if (subscriptionFactory is null) { throw new ArgumentNullException(nameof(subscriptionFactory)); } var pattern = new PatternBuilder("playground") .With("data") .With("ascii") .Build(); this.subscription = subscriptionFactory.Create(pattern, this.SimulateSaveData); this.logger = logger; }