LogAnalytics.Client
LogAnalytics.Client copied to clipboard
Modify DI to inject service interface instead of implementation
Hello,
I'm wondering if it could be possible to inject the ILogAnalyticsClient interface instead of LogAnalyticsClient class ?
By replacing
services.AddHttpClient<LogAnalyticsClient>();
by
services.AddHttpClient<ILogAnalyticsClient, LogAnalyticsClient>();
I think it would make a breaking change when getting LogAnalyticsClient in services constructor but it would be more easier to mock services in tests.