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>(
135135 }
136136
137137 return services . AddEnyimMemcached < T > (
138- s => s . AddOptions < MemcachedClientOptions > ( ) . BindConfiguration ( sectionKey ) ) ;
138+ s => s . AddOptions < MemcachedClientOptions < T > > ( ) . BindConfiguration ( sectionKey ) ) ;
139139 }
140140
141141 public static IServiceCollection AddEnyimMemcached < T > (
@@ -154,7 +154,7 @@ public static IServiceCollection AddEnyimMemcached<T>(
154154 }
155155
156156 return services . AddEnyimMemcached < T > (
157- s => s . Configure < MemcachedClientOptions > ( configuration . GetSection ( sectionKey ) ) ) ;
157+ s => s . Configure < MemcachedClientOptions < T > > ( configuration . GetSection ( sectionKey ) ) ) ;
158158 }
159159#endif
160160
@@ -171,7 +171,7 @@ public static IServiceCollection AddEnyimMemcached<T>(
171171 services . TryAddSingleton < IMemcachedClient < T > > ( sp =>
172172 {
173173 var loggerFactory = sp . GetRequiredService < ILoggerFactory > ( ) ;
174- var options = sp . GetRequiredService < IOptions < MemcachedClientOptions > > ( ) ;
174+ var options = sp . GetRequiredService < IOptions < MemcachedClientOptions < T > > > ( ) ;
175175 var conf = new MemcachedClientConfiguration ( loggerFactory , options ) ;
176176 return new MemcachedClient < T > ( loggerFactory , conf ) ;
177177 } ) ;
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 ;
34using System . Collections . Generic ;
45using System . Threading . Tasks ;
5- using Enyim . Caching . Memcached . Results ;
66
77namespace Enyim . Caching
88{
You can’t perform that action at this time.
0 commit comments