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#
22 lines
618 B
C#
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));
|
|
|
|
//services.AddScoped<IRedisService, RedisService>();
|
|
services.AddSingleton<IRedisService, RedisService>();
|
|
}
|
|
} |