Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created June 17, 2020 23:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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