In Glass.Mapper.Sc v 4.0.1.5 ISitecoreService and ISitecoreContext have all their method signatures with inferType default to false. I'm looking for a way to override that and default to true without changing the method calls all over the site.
I created another interface to override those just to modify the inferType default to true but I was wondering if there's a better solution.
There isn't an automatic override to do this but it might be simpler to create your own task in the configuration resolver pipeline.
If you look at the following line of code: https://github.com/mikeedwards83/Glass.Mapper/blob/master/Source/Glass.Mapper.Sc/Pipelines/ConfigurationResolver/TemplateInferredTypeTask.cs#L48
You can see that it just checks for the InferType flag, you could create another pipeline at the start of the request that just sets this to true. Every request would then be force through InferType.
You will need to register your new pipeline process in the GlassMapperScCustom against the DependencyResolver.ConfigurationResolverFactory using the Add method.