Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created September 30, 2020 21:18
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/5e8438967cb866ed6995a5e4aea123c0 to your computer and use it in GitHub Desktop.
Save dcomartin/5e8438967cb866ed6995a5e4aea123c0 to your computer and use it in GitHub Desktop.
using Newtonsoft.Json;
namespace Hangfire.MediatR
{
public static class HangfireConfigurationExtensions
{
public static void UseMediatR(this IGlobalConfiguration configuration)
{
var jsonSettings = new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.All
};
configuration.UseSerializerSettings(jsonSettings);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment