You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
618 B
C#

5 months ago
namespace DS.Module.RedisModule;
using Microsoft.Extensions.DependencyInjection;
/// <summary>
/// 注入Redis服务
/// </summary>
public static class RedisModuleInstall
{
/// <summary>
///
/// </summary>
/// <param name="services"></param>
/// <exception cref="ArgumentNullException"></exception>
public static void AddRedisModuleInstall(this IServiceCollection services)
{
if (services == null) throw new ArgumentNullException(nameof(services));
4 months ago
//services.AddScoped<IRedisService, RedisService>();
services.AddSingleton<IRedisService, RedisService>();
5 months ago
}
}