Skip to content

Commit 3b27791

Browse files
- Added option to provide custom service lifetime to spec.
1 parent e3bb44f commit 3b27791

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/IServicesProvider.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using LightInject;
34

45
namespace Barotrauma.LuaCs.Services;
56

@@ -14,9 +15,10 @@ public interface IServicesProvider
1415
/// Registers a type as a service for a given interface.
1516
/// </summary>
1617
/// <param name="lifetime"></param>
18+
/// <param name="lifetimeInstance"></param>
1719
/// <typeparam name="TSvcInterface"></typeparam>
1820
/// <typeparam name="TService"></typeparam>
19-
void RegisterServiceType<TSvcInterface, TService>(ServiceLifetime lifetime) where TSvcInterface : class, IService where TService : class, IService;
21+
void RegisterServiceType<TSvcInterface, TService>(ServiceLifetime lifetime, ILifetime lifetimeInstance = null) where TSvcInterface : class, IService where TService : class, IService;
2022

2123
/// <summary>
2224
/// Removes a type's registration from being available for the given interface.

0 commit comments

Comments
 (0)