File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change
1
+ namespace Enyim . Caching . Configuration ;
2
+
3
+ public class MemcachedClientOptions < T > : MemcachedClientOptions
4
+ { }
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ public static IServiceCollection AddEnyimMemcached<T>(
135
135
}
136
136
137
137
return services . AddEnyimMemcached < T > (
138
- s => s . AddOptions < MemcachedClientOptions > ( ) . BindConfiguration ( sectionKey ) ) ;
138
+ s => s . AddOptions < MemcachedClientOptions < T > > ( ) . BindConfiguration ( sectionKey ) ) ;
139
139
}
140
140
141
141
public static IServiceCollection AddEnyimMemcached < T > (
@@ -154,7 +154,7 @@ public static IServiceCollection AddEnyimMemcached<T>(
154
154
}
155
155
156
156
return services . AddEnyimMemcached < T > (
157
- s => s . Configure < MemcachedClientOptions > ( configuration . GetSection ( sectionKey ) ) ) ;
157
+ s => s . Configure < MemcachedClientOptions < T > > ( configuration . GetSection ( sectionKey ) ) ) ;
158
158
}
159
159
#endif
160
160
@@ -171,7 +171,7 @@ public static IServiceCollection AddEnyimMemcached<T>(
171
171
services . TryAddSingleton < IMemcachedClient < T > > ( sp =>
172
172
{
173
173
var loggerFactory = sp . GetRequiredService < ILoggerFactory > ( ) ;
174
- var options = sp . GetRequiredService < IOptions < MemcachedClientOptions > > ( ) ;
174
+ var options = sp . GetRequiredService < IOptions < MemcachedClientOptions < T > > > ( ) ;
175
175
var conf = new MemcachedClientConfiguration ( loggerFactory , options ) ;
176
176
return new MemcachedClient < T > ( loggerFactory , conf ) ;
177
177
} ) ;
Original file line number Diff line number Diff line change 1
- using System ;
2
- using Enyim . Caching . Memcached ;
1
+ using Enyim . Caching . Memcached ;
2
+ using Enyim . Caching . Memcached . Results ;
3
+ using System ;
3
4
using System . Collections . Generic ;
4
5
using System . Threading . Tasks ;
5
- using Enyim . Caching . Memcached . Results ;
6
6
7
7
namespace Enyim . Caching
8
8
{
You can’t perform that action at this time.
0 commit comments