Skip to content

Commit 4387a7f

Browse files
authored
Add SetApplication and SetServiceProvider methods to ApplicationManager.
2 parents 3ca87e1 + 06e5182 commit 4387a7f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Aquality.Selenium.Core/src/Aquality.Selenium.Core/Applications/ApplicationManager.cs

+10
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ protected static TApplication GetApplication(Func<IServiceProvider, TApplication
2323
return AppContainer.Value;
2424
}
2525

26+
protected static void SetApplication(TApplication application)
27+
{
28+
AppContainer.Value = application;
29+
}
30+
2631
protected static IServiceProvider GetServiceProvider(Func<IServiceProvider, TApplication> applicationSupplier, Func<IServiceCollection> serviceCollectionProvider = null)
2732
{
2833
if (!ServiceProviderContainer.IsValueCreated)
@@ -41,5 +46,10 @@ protected static IServiceProvider GetServiceProvider(Func<IServiceProvider, TApp
4146
}
4247
return ServiceProviderContainer.Value;
4348
}
49+
50+
protected static void SetServiceProvider(IServiceProvider serviceProvider)
51+
{
52+
ServiceProviderContainer.Value = serviceProvider;
53+
}
4454
}
4555
}

0 commit comments

Comments
 (0)