@@ -19,7 +19,7 @@ public interface IServicesProvider
19
19
/// <param name="lifetimeInstance"></param>
20
20
/// <typeparam name="TSvcInterface"></typeparam>
21
21
/// <typeparam name="TService"></typeparam>
22
- void RegisterServiceType < TSvcInterface , TService > ( ServiceLifetime lifetime , ILifetime lifetimeInstance = null ) where TSvcInterface : class , IService where TService : class , IService , TSvcInterface , new ( ) ;
22
+ FluentResults . Result RegisterServiceType < TSvcInterface , TService > ( ServiceLifetime lifetime , ILifetime lifetimeInstance = null ) where TSvcInterface : class , IService where TService : class , IService , TSvcInterface , new ( ) ;
23
23
24
24
/// <summary>
25
25
/// Registers a type as a service for a given interface that can be requested by name.
@@ -29,7 +29,7 @@ public interface IServicesProvider
29
29
/// <param name="lifetimeInstance"></param>
30
30
/// <typeparam name="TSvcInterface"></typeparam>
31
31
/// <typeparam name="TService"></typeparam>
32
- void RegisterServiceType < TSvcInterface , TService > ( string name , ServiceLifetime lifetime , ILifetime lifetimeInstance = null ) where TSvcInterface : class , IService where TService : class , IService , TSvcInterface , new ( ) ;
32
+ FluentResults . Result RegisterServiceType < TSvcInterface , TService > ( string name , ServiceLifetime lifetime , ILifetime lifetimeInstance = null ) where TSvcInterface : class , IService where TService : class , IService , TSvcInterface , new ( ) ;
33
33
34
34
/// <summary>
35
35
/// Called whenever a new service type for a given interface is implemented.
@@ -57,21 +57,17 @@ public interface IServicesProvider
57
57
/// <summary>
58
58
/// Tries to get a service for the given interface, returns success/failure.
59
59
/// </summary>
60
- /// <param name="service"></param>
61
- /// <param name="lifetime"></param>
62
60
/// <typeparam name="TSvcInterface"></typeparam>
63
61
/// <returns></returns>
64
- bool TryGetService < TSvcInterface > ( out IService service ) where TSvcInterface : class , IService ;
62
+ FluentResults . Result < TSvcInterface > GetService < TSvcInterface > ( ) where TSvcInterface : class , IService ;
65
63
66
64
/// <summary>
67
65
/// Tries to get a service for the given name and interface, returns success/failure.
68
66
/// </summary>
69
67
/// <param name="name"></param>
70
- /// <param name="service"></param>
71
- /// <param name="lifetime"></param>
72
68
/// <typeparam name="TSvcInterface"></typeparam>
73
69
/// <returns></returns>
74
- bool TryGetService < TSvcInterface > ( string name , out IService service ) where TSvcInterface : class , IService ;
70
+ FluentResults . Result < TSvcInterface > GetService < TSvcInterface > ( string name ) where TSvcInterface : class , IService ;
75
71
76
72
/// <summary>
77
73
/// Called whenever a new service is created/instanced.
@@ -89,7 +85,7 @@ public interface IServicesProvider
89
85
/// </summary>
90
86
/// <typeparam name="TSvc"></typeparam>
91
87
/// <returns></returns>
92
- ImmutableArray < TSvc > GetAllServices < TSvc > ( ) where TSvc : class , IService ;
88
+ FluentResults . Result < ImmutableArray < TSvc > > GetAllServices < TSvc > ( ) where TSvc : class , IService ;
93
89
94
90
#endregion
95
91
@@ -99,7 +95,7 @@ public interface IServicesProvider
99
95
/// <summary>
100
96
/// Notes: Internal use only if hosted by LuaCsForBarotrauma. Disposes of all services and resets DI container. Warning: unable to dispose of services held by other objects.
101
97
/// </summary>
102
- void DisposeAndReset ( ) ;
98
+ void Reset ( ) ;
103
99
104
100
#endregion
105
101
}
0 commit comments