Overriding SignalR Contract Resolver in ASP.NET Boilerplate

431 Views Asked by At

I'm having an issue where methods called in a signal R hub are returning camel cased. I see in the boilerplate documentation there is a section in signalR on how to override the default behavior

https://aspnetboilerplate.com/Pages/Documents/SignalR-Integration#pascalcase-vs-camelcase

I can't figure out how to implement this correctly. I've tried adding the below snippet to the Startup.cs before and after app.MapSignalR(). I've tried adding it to the Pre-initialize of the web module, I've added all of my assemblies; I'm out of ideas.

AbpSignalRContractResolver.IgnoredAssemblies.Add(typeof(MyWebModule).Assembly);

I'm using .NET 4.6.x, ABP Version 3.2.4

1

There are 1 best solutions below

2
Ray Flowers On BEST ANSWER

If the type that you want to use the default contract resolver for is in that module then you're good to go but if you're using a third part library outside of the module then you to make sure that is added to the list. From what I can tell the code that you have above should work it's just a matter of making sure the right types are added.