Skip to content

Commit

Permalink
Obsoleted messages marked with error: true. Fixes #794.
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnetjunkie committed Jan 5, 2020
1 parent 4f19887 commit 7b502c7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public static class SimpleInjectorAspNetCoreMvcIntegrationExtensions
"—e.g. 'services.AddSimpleInjector(container, options => options.AddAspNetCore()." +
nameof(SimpleInjectorAspNetCoreBuilderMvcCoreExtensions.AddControllerActivation) + "());'. " +
"Please see https://simpleinjector.org/aspnetcore for more details. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static void RegisterMvcControllers(
this Container container, IApplicationBuilder applicationBuilder)
Expand Down Expand Up @@ -78,8 +78,8 @@ public static void RegisterMvcControllers(
"—e.g. 'services.AddSimpleInjector(container, options => options.AddAspNetCore()." +
nameof(SimpleInjectorAspNetCoreBuilderMvcCoreExtensions.AddViewComponentActivation) + "());'. " +
"Please see https://simpleinjector.org/aspnetcore for more details. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static void RegisterMvcViewComponents(
this Container container, IApplicationBuilder applicationBuilder)
Expand Down Expand Up @@ -121,8 +121,8 @@ public static void RegisterMvcViewComponents(
"—e.g. 'services.AddSimpleInjector(container, options => options.AddAspNetCore()." +
nameof(SimpleInjectorAspNetCoreBuilderMvcCoreExtensions.AddViewComponentActivation) + "());'. " +
"Please see https://simpleinjector.org/aspnetcore for more details. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static void RegisterMvcViewComponents(
this Container container, IViewComponentDescriptorProvider viewComponentDescriptorProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public static class SimpleInjectorAspNetCoreMvcIntegrationExtensions
"'services.AddSimpleInjector(container, options => options.AddAspNetCore()." +
nameof(SimpleInjectorAspNetCoreBuilderMvcExtensions.AddTagHelperActivation) + "());'. " +
"Please see https://simpleinjector.org/aspnetcore for more details. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static void AddSimpleInjectorTagHelperActivation(
this IServiceCollection services,
Expand Down Expand Up @@ -84,8 +84,8 @@ public static void AddSimpleInjectorTagHelperActivation(
"'services.AddSimpleInjector(container, options => options.AddAspNetCore()." +
nameof(SimpleInjectorAspNetCoreBuilderMvcExtensions.AddPageModelActivation) + "());'. " +
"Please see https://simpleinjector.org/aspnetcore for more details. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static void RegisterPageModels(
this Container container, IApplicationBuilder applicationBuilder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public static T GetRequiredRequestService<T>(this IApplicationBuilder builder)
[Obsolete("Please call services.AddSimpleInjector() instead. AddSimpleInjector can be called from " +
"within the ConfigureServices method of the Startup class. " +
"See https://simpleinjector.org/aspnetcore for more information. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
public static void EnableSimpleInjectorCrossWiring(
this IServiceCollection services, Container container)
{
Expand All @@ -130,8 +130,8 @@ public static void EnableSimpleInjectorCrossWiring(
[Obsolete("Please call services.AddSimpleInjector(options => { options.CrossWire<TService>(); }) " +
"instead. AddSimpleInjector can be called from within the ConfigureServices method of the " +
"Startup class. See https://simpleinjector.org/aspnetcore for more information. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
public static void CrossWire<TService>(this Container container, IApplicationBuilder builder)
where TService : class
{
Expand All @@ -148,8 +148,8 @@ public static void CrossWire<TService>(this Container container, IApplicationBui
[Obsolete("Please call services.AddSimpleInjector(options => { options.CrossWire(typeof(YourType));" +
" }) instead. AddSimpleInjector can be called from within the ConfigureServices method of the " +
"Startup class. See https://simpleinjector.org/aspnetcore for more information. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
public static void CrossWire(this Container container, Type serviceType, IApplicationBuilder builder)
{
Requires.IsNotNull(container, nameof(container));
Expand Down Expand Up @@ -258,8 +258,8 @@ public static IApplicationBuilder UseMiddleware(
[Obsolete("Please call services.AddSimpleInjector() instead. AddSimpleInjector can be called from " +
"within the ConfigureServices method of the Startup class. It ensures auto cross wiring is " +
"enabled. See https://simpleinjector.org/aspnetcore for more information. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
public static void AutoCrossWireAspNetComponents(this Container container, IApplicationBuilder app)
{
Requires.IsNotNull(app, nameof(app));
Expand All @@ -278,8 +278,8 @@ public static void AutoCrossWireAspNetComponents(this Container container, IAppl
[Obsolete("Please call services.AddSimpleInjector() instead. AddSimpleInjector can be called from " +
"within the ConfigureServices method of the Startup class. It ensures auto cross wiring is " +
"enabled. See https://simpleinjector.org/aspnetcore for more information. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
public static void AutoCrossWireAspNetComponents(
this Container container, IServiceProvider appServices)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public static IApplicationBuilder UseSimpleInjector(
"call). Instead, take care that you call .UseMiddleware<TMiddleware>(Container) at the right " +
"stage. This typically means after .UseStaticFiles() and .UseAuthorization(), but before " +
".UseEndpoints(...). See https://simpleinjector.org/aspnetcore for more information. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
public static void UseMiddleware<TMiddleware>(
this SimpleInjectorUseOptions options, IApplicationBuilder app)
where TMiddleware : class, IMiddleware
Expand All @@ -111,8 +111,8 @@ public static void UseMiddleware<TMiddleware>(
"call). Instead, take care that you call .UseMiddleware<TMiddleware>(Container) at the right " +
"stage. This typically means after .UseStaticFiles() and .UseAuthorization(), but before " +
".UseEndpoints(...). See https://simpleinjector.org/aspnetcore for more information. " +
"Will be treated as an error from version 4.9. Will be removed in version 5.0.",
error: false)]
"Will be removed in version 5.0.",
error: true)]
public static void UseMiddleware(
this SimpleInjectorUseOptions options, Type middlewareType, IApplicationBuilder app)
{
Expand Down

0 comments on commit 7b502c7

Please sign in to comment.