Skip to content

ApplicationServicesContext.SetCurrent method

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

Namespace: Eremex.AvaloniaUI.Controls.ApplicationServices
Assembly: Eremex.Avalonia.Controls.ApplicationServices.dll
NuGet Package: Eremex.Avalonia.Controls.ApplicationServices

Declaration

public static void SetCurrent(IServiceProvider? serviceProvider)

Parameters

name type description
serviceProvider IServiceProvider? The provider that resolves the application services, or null to clear the context.

See Also

Used in articles