Skip to content

Commit

Permalink
Resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Long Do Thanh committed May 15, 2024
1 parent 49bfaea commit 970f829
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Hosting/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ public static class ServiceCollectionExtensions
/// <summary>
/// Add Omex Logging and ActivitySource dependencies
/// </summary>
[Obsolete($"Please do not use {nameof(AddOmexServices)} if you just want to use Legacy OmexLogger and ActivityEventSender because they are deprecated. Consider using a different telemetry solution. This method is pending for removal by 1 July 2024.", DiagnosticId = "OMEX188")]
public static IHostBuilder AddOmexServices(this IHostBuilder builder) =>
builder
.ConfigureServices((context, collection) => collection.AddOmexServices());

/// <summary>
/// Add Omex Logging and ActivitySource dependencies
/// </summary>
[Obsolete($"Please do not use {nameof(AddOmexServices)} if you just want to use Legacy OmexLogger and ActivityEventSender because they are deprecated. Consider using a different telemetry solution. This method is pending for removal by 1 July 2024.", DiagnosticId = "OMEX188")]
public static IServiceCollection AddOmexServices(this IServiceCollection collection) =>
#pragma warning disable OMEX188 // OmexLogger and OmexLogEventSource are obsolete and pending for removal by 1 July 2024. Please consider using a different Logger.
collection
.AddOmexLogging()
#pragma warning restore OMEX188 // OmexLogger and OmexLogEventSource are obsolete and pending for removal by 1 July 2024. Please consider using a different Logger.
.AddOmexActivitySource();

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion tests/Hosting.UnitTests/HostBuilderExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class HostBuilderExtensionsTests
[DataTestMethod]
[DataRow(typeof(ILogger<HostBuilderExtensionsTests>))]
[DataRow(typeof(ActivitySource))]
[Obsolete("AddOmexServices is Obsolete and pending for removal on 1 July 2024.", DiagnosticId = "OMEX188")]
public void AddOmexServices_TypesRegistered(Type type)
{
object? collectionObj = new ServiceCollection()
Expand Down

0 comments on commit 970f829

Please sign in to comment.