Skip to content

Commit

Permalink
Fixed Extension bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhindrik committed Oct 11, 2024
1 parent d9da82e commit ce27dbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TinyInsights/InsightsExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static MauiAppBuilder UseTinyInsights(this MauiAppBuilder appBuilder)
return appBuilder;
}

public static MauiAppBuilder UseTinyInsights(this MauiAppBuilder appBuilder, string? applicationInsightsConnectionString = null, Action<IInsightsProvider, IServiceCollection>? configureProvider = null)
public static MauiAppBuilder UseTinyInsights(this MauiAppBuilder appBuilder, string? applicationInsightsConnectionString = null, Action<IInsightsProvider, IServiceProvider>? configureProvider = null)
{
return UseTinyInsights(appBuilder, applicationInsightsConnectionString, null, configureProvider);
}
Expand All @@ -21,9 +21,9 @@ public static MauiAppBuilder UseTinyInsights(this MauiAppBuilder appBuilder, str
return UseTinyInsights(appBuilder, applicationInsightsConnectionString, configureProvider, null);
}

private static MauiAppBuilder UseTinyInsights(this MauiAppBuilder appBuilder, string? applicationInsightsConnectionString = null, Action<IInsightsProvider>? configureProvider = null, Action<IInsightsProvider, IServiceCollection>? configureProviderWithServiceCollection = null)
private static MauiAppBuilder UseTinyInsights(this MauiAppBuilder appBuilder, string? applicationInsightsConnectionString = null, Action<IInsightsProvider>? configureProvider = null, Action<IInsightsProvider, IServiceProvider>? configureProviderWithServiceCollection = null)
{
appBuilder.Services.AddSingleton<IInsights>((_) =>
appBuilder.Services.AddSingleton<IInsights>((serviceProvider) =>
{
#if WINDOWS

Expand All @@ -36,7 +36,7 @@ private static MauiAppBuilder UseTinyInsights(this MauiAppBuilder appBuilder, st

if (configureProviderWithServiceCollection is not null)
{
configureProviderWithServiceCollection.Invoke(provider, appBuilder.Services);
configureProviderWithServiceCollection.Invoke(provider, serviceProvider);
}
else if (configureProvider is not null)
{
Expand Down

0 comments on commit ce27dbe

Please sign in to comment.