Skip to content

Commit cfc0dee

Browse files
authored
Updated obsolete message
1 parent 88b9aec commit cfc0dee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Platforms/Exceptionless.AspNetCore/ExceptionlessExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ public static IApplicationBuilder UseExceptionless(this IApplicationBuilder app,
4242
return app.UseMiddleware<ExceptionlessMiddleware>(client);
4343
}
4444

45-
[Obsolete("ExceptionlessClient should be configured when adding to services collection using AddExceptionless")]
45+
[Obsolete("UseExceptionless should be called without an overload, ExceptionlessClient should be configured when adding to services collection using AddExceptionless")]
4646
public static IApplicationBuilder UseExceptionless(this IApplicationBuilder app, Action<ExceptionlessConfiguration> configure) {
4747
var client = app.ApplicationServices.GetService<ExceptionlessClient>() ?? ExceptionlessClient.Default;
4848
configure?.Invoke(client.Configuration);
4949
return app.UseExceptionless(client);
5050
}
5151

52-
[Obsolete("ExceptionlessClient should be configured when adding to services collection using AddExceptionless")]
52+
[Obsolete("UseExceptionless should be called without an overload, ExceptionlessClient should be configured when adding to services collection using AddExceptionless")]
5353
public static IApplicationBuilder UseExceptionless(this IApplicationBuilder app, IConfiguration configuration) {
5454
var client = app.ApplicationServices.GetService<ExceptionlessClient>() ?? ExceptionlessClient.Default;
5555
client.Configuration.ReadFromConfiguration(configuration);
5656
return app.UseExceptionless(client);
5757
}
5858

59-
[Obsolete("ExceptionlessClient should be configured when adding to services collection using AddExceptionless")]
59+
[Obsolete("UseExceptionless should be called without an overload, ExceptionlessClient should be configured when adding to services collection using AddExceptionless")]
6060
public static IApplicationBuilder UseExceptionless(this IApplicationBuilder app, string apiKey) {
6161
var client = app.ApplicationServices.GetService<ExceptionlessClient>() ?? ExceptionlessClient.Default;
6262
client.Configuration.ApiKey = apiKey;
@@ -103,4 +103,4 @@ public static EventBuilder SetHttpContext(this EventBuilder builder, HttpContext
103103
return builder;
104104
}
105105
}
106-
}
106+
}

0 commit comments

Comments
 (0)