Created
June 17, 2020 23:31
-
-
Save dcomartin/79d2182da4185778466f4d6386c5d9ef 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 DotNetCore.CAP; | |
using Microsoft.Extensions.Logging; | |
namespace CAPDemo | |
{ | |
public class HelloWorldReceiver : ICapSubscribe | |
{ | |
private readonly ILogger<HelloWorldReceiver> _logger; | |
public HelloWorldReceiver(ILogger<HelloWorldReceiver> logger) | |
{ | |
_logger = logger; | |
} | |
[CapSubscribe("helloWorld")] | |
public void Handle(string value) | |
{ | |
_logger.Log(LogLevel.Debug, value); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment