It turns out we were using the feature correctly, but the type that wasn't getting pascal cased was a wrapper in a third party library, which wasn't getting ignored. Adding that to the block of assemblies to ignore worked perfectly.
Just the Signal R hub. I need to keep the camel case resolver for the prebuilt ASPNetZero stuff, and I already have an Action filter I add to the IAppService interfaces that replaced the contract resolver on a per action basis, but the SignalR hub is overriding that behavior. I tried to tie in to the HubPipeline with a module that tried to catch OnBeforeOutgoing but that didn't seem to work as I expected. Since there is a block of text in the documentation referring to this very issue, I assumed there would be some 'correct' way of doing what I'm trying to do in ABP.
Pascal case please
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 added the below snippet in the Startup.cs before and after app.MapSignalR(). I've added 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);
Please advise, thanks!
Yeah workaround ended up working. Applied the below linked stack overflow answer, but in reverse (using default contract resolver). Added the DefaultCasingFilter action attribute to the methods in the application service interface, seems to work as intended. Something else was going on with the users and roles that the camel casing wasn't working, but the reverse works just fine.
<a class="postlink" href="https://stackoverflow.com/a/14532163/1299226">https://stackoverflow.com/a/14532163/1299226</a>
I think I might have fixed this issue by removing the global default contract resolver and applying the action filter to a specific method on the app service interface. Will continue testing and update accordingly
I am using tools that require Json to serialize in PascalCase, and I was able to override the contract resolver with the DefaultContractResolver in the WebApiModule's PostInitialize method. This works great, but unfortunately appears to affect the built in users and role manangement that I would like to keep as is. My desired outcome is the ability to override the contract resolver on a per action basis, either replacing the contract resolver for the methods that ASPNET Zero calls, or the ones I made. I'm pretty sure it wouldn't be too hard to do with regular controllers and some attributes, but something in the pipeline isn't working as I intend with the dynamic web api controllers. I took a crack at adding an Action filter attribute to a method in the IMyApplicationService interface, and it seems to execute the action filter, and during OnActionExecuted, I'm replacing the default contract resolver with a camel case one, but the response is still in PascalCase, which the users page doesn't really appreciate. What is the best way to go about achieving this goal?