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

43 lines
1.4 KiB

2 years ago
/*----------------------------------------------------------------
Copyright (C) 2023 Senparc
MemcachedServiceCollectionExtensions.cs
Memcached
Senparc - 20180222
----------------------------------------------------------------*/
#if !NET462
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Enyim.Caching.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Senparc.Weixin.Cache.Memcached;
namespace Microsoft.Extensions.DependencyInjection
{
public static class MemcachedServiceCollectionExtensions
{
/// <summary>
/// .NET Core下设置依赖注入暂时请用CO2NET对应 AddSenparcMemcached 方法)
/// </summary>
/// <param name="services"></param>
/// <param name="setupAction"></param>
/// <returns></returns>
public static IServiceCollection AddWeixinMemcached(this IServiceCollection services, Action<MemcachedClientOptions> setupAction)
{
return services;
//services.AddSingleton<MemcachedObjectCacheStrategy, MemcachedObjectCacheStrategy>();
//services.AddSingleton<MemcachedContainerStrategy, MemcachedContainerStrategy>();
//return services.AddEnyimMemcached(setupAction);
}
}
}
#endif