-
-
Save tuannguyenssu/8af40aebec2c417994254831434926d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MassTransit; | |
using Microsoft.Extensions.Hosting; | |
namespace MassTransitTest | |
{ | |
public class BusService : IHostedService | |
{ | |
private readonly IBusControl _busControl; | |
public BusService(IBusControl busControl) | |
{ | |
_busControl = busControl; | |
} | |
public Task StartAsync(CancellationToken cancellationToken) | |
{ | |
return _busControl.StartAsync(cancellationToken); | |
} | |
public Task StopAsync(CancellationToken cancellationToken) | |
{ | |
return _busControl.StopAsync(cancellationToken); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment