|
|
|
@ -2,18 +2,12 @@ |
|
|
|
|
|
|
|
namespace Volo.Abp.DependencyInjection; |
|
|
|
|
|
|
|
public interface IAbpLazyServiceProvider : IServiceProvider |
|
|
|
/// <summary>
|
|
|
|
/// This service is equivalent of the <see cref="ITransientCachedServiceProvider"/>.
|
|
|
|
/// Use <see cref="ITransientCachedServiceProvider"/> instead of this interface, for new projects.
|
|
|
|
/// </summary>
|
|
|
|
public interface IAbpLazyServiceProvider : ICachedServiceProviderBase |
|
|
|
{ |
|
|
|
T GetService<T>(T defaultValue); |
|
|
|
|
|
|
|
object GetService(Type serviceType, object defaultValue); |
|
|
|
|
|
|
|
T GetService<T>(Func<IServiceProvider, object> factory); |
|
|
|
|
|
|
|
object GetService(Type serviceType, Func<IServiceProvider, object> factory); |
|
|
|
|
|
|
|
#region Old Methods
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// This method is equivalent of the GetRequiredService method.
|
|
|
|
/// It does exists for backward compatibility.
|
|
|
|
@ -39,28 +33,26 @@ public interface IAbpLazyServiceProvider : IServiceProvider |
|
|
|
object LazyGetService(Type serviceType); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// This method is equivalent of the <see cref="GetService{T}(T)"/> method.
|
|
|
|
/// This method is equivalent of the <see cref="ICachedServiceProviderBase.GetService{T}(T)"/> method.
|
|
|
|
/// It does exists for backward compatibility.
|
|
|
|
/// </summary>
|
|
|
|
T LazyGetService<T>(T defaultValue); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// This method is equivalent of the <see cref="GetService(Type, object)"/> method.
|
|
|
|
/// This method is equivalent of the <see cref="ICachedServiceProviderBase.GetService(Type, object)"/> method.
|
|
|
|
/// It does exists for backward compatibility.
|
|
|
|
/// </summary>
|
|
|
|
object LazyGetService(Type serviceType, object defaultValue); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// This method is equivalent of the <see cref="GetService(Type, Func{IServiceProvider, object})"/> method.
|
|
|
|
/// This method is equivalent of the <see cref="ICachedServiceProviderBase.GetService(Type, Func{IServiceProvider, object})"/> method.
|
|
|
|
/// It does exists for backward compatibility.
|
|
|
|
/// </summary>
|
|
|
|
object LazyGetService(Type serviceType, Func<IServiceProvider, object> factory); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// This method is equivalent of the <see cref="GetService{T}(T)"/> method.
|
|
|
|
/// This method is equivalent of the <see cref="ICachedServiceProviderBase.GetService{T}(Func{IServiceProvider, object})"/> method.
|
|
|
|
/// It does exists for backward compatibility.
|
|
|
|
/// </summary>
|
|
|
|
T LazyGetService<T>(Func<IServiceProvider, object> factory); |
|
|
|
|
|
|
|
#endregion
|
|
|
|
} |
|
|
|
|