Files
SPT-Server-Build/Libraries/SPTarkov.Server.Core/DI/ServiceLocator.cs
T
2025-11-05 14:41:28 +01:00

20 lines
741 B
C#

namespace SPTarkov.Server.Core.DI;
/// <summary>
/// A service locator designed specifically for Harmony patches and other
/// parts of the application that do not have direct access to the Dependency Injection (DI) system.
///
/// This should not be used at all when having direct access to DI.
/// </summary>
[Obsolete("This will be removed in the next version of SPT in favor of DI injecting patches")]
public static class ServiceLocator
{
[Obsolete("This will be removed in the next version of SPT in favor of DI injecting patches")]
public static IServiceProvider ServiceProvider { get; private set; }
internal static void SetServiceProvider(IServiceProvider provider)
{
ServiceProvider = provider;
}
}