Currently, GlobalConfiguration.Configuration is a static property with only a getter.
It should have a public setter too.
Customer/team scenarios asking for this are:
- Organizations may want a set of defaults or extensions available to all their apps.
- Organizations may have multiple configurations tuned to different styles of app.
- Testability -- currently the global static must be manually altered and manually repaired per unit test.
Comments: For the first two, you can register a Func<HttpConfiguration> such as WebApiConfig.Register() for reusing the same configuration.
It should have a public setter too.
Customer/team scenarios asking for this are:
- Organizations may want a set of defaults or extensions available to all their apps.
- Organizations may have multiple configurations tuned to different styles of app.
- Testability -- currently the global static must be manually altered and manually repaired per unit test.
Comments: For the first two, you can register a Func<HttpConfiguration> such as WebApiConfig.Register() for reusing the same configuration.