public AddMethod ( |
||
method | ||
cacheManagerId | string | |
Результат | void |
private void GatherCacheAttributes(CacheConfig config, ComponentModel model) { MethodInfo[] methods = model.Implementation.GetMethods( BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo method in methods) { if (method.IsDefined(typeof(CacheAttribute), true)) { CacheAttribute[] attributs = method.GetCustomAttributes(typeof(CacheAttribute), true) as CacheAttribute[]; string cacheManagerId = attributs[0].CacheManagerId; config.AddMethod(method, cacheManagerId); } } }
private void GatherCacheAttributes(CacheConfig config, ComponentModel model) { MethodInfo[] methods = model.Implementation.GetMethods( BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic ); foreach(MethodInfo method in methods) { if (method.IsDefined( typeof(CacheAttribute), true )) { CacheAttribute[] attributs = method.GetCustomAttributes(typeof(CacheAttribute), true) as CacheAttribute[]; string cacheManagerId = attributs[0].CacheManagerId; config.AddMethod( method, cacheManagerId ); } } }