简体   繁体   中英

Overriding SignalR Contract Resolver in ASP.NET Boilerplate

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM