Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created June 17, 2020 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/79d2182da4185778466f4d6386c5d9ef to your computer and use it in GitHub Desktop.
Save dcomartin/79d2182da4185778466f4d6386c5d9ef to your computer and use it in GitHub Desktop.
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