Skip to content

ApplicationServicesContext.SetCurrent method

Sets the current service provider. Called once at application startup. Passing null resets the context (used in tests).

public static void SetCurrent(IServiceProvider? serviceProvider)
parameter description
serviceProvider The provider that resolves the application services, or null to clear the context.

See Also