public TopicPublisherController(
     ITopicPublisher <SampleTopicMessage> sampleTopicMessagePublisher,
     ITopicPublisher <Sample1DayTopicMessage> sample1DayTopicMessagePublisher)
 {
     _sampleTopicMessagePublisher     = sampleTopicMessagePublisher ?? throw new ArgumentNullException(nameof(sampleTopicMessagePublisher));
     _sample1DayTopicMessagePublisher = sample1DayTopicMessagePublisher ?? throw new ArgumentNullException(nameof(sample1DayTopicMessagePublisher));
 }
Beispiel #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ITopicPublisher topicPublisher)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHangfireDashboard();

            topicPublisher.EnqueueTopic("topic1");

            app.UseRouting();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapGet("/", async context => { await context.Response.WriteAsync("Hello World!"); });
            });
        }
Beispiel #3
0
 public EventPublisher(StatelessServiceContext context, ITopicPublisher <AuctionUpdate, AuctionSubscription> topicPublisher)
     : base(context)
 {
     _topicPublisher = topicPublisher ?? throw new ArgumentNullException(nameof(topicPublisher));
 }
Beispiel #4
0
 public NotificationService(ITopicPublisher topicPublisher, ITopicSubscriber topicSubscriber, ITopicManager topicManager)
 {
     _topicPublisher  = topicPublisher;
     _topicSubscriber = topicSubscriber;
     _topicManager    = topicManager;
 }
 public CommandService(ITopicPublisher topicPublisher, ITopicSubscriber topicSubscriber, ITopicManager topicManager)
 {
     _topicPublisher = topicPublisher;
     _topicManager   = topicManager;
 }