private void loadAllMethods() { if (!_allMeth) { MethodInfo[] mi = CU.ExcelRegisteredMethods(ItemType); if (mi.GetLength(0) != _meth.Count) { foreach (MethodInfo m in mi) { CacheItemMethod c = new CacheItemMethod(m); if (!_meth.ContainsKey(c.ExcelName)) _meth.Add(c.ExcelName, c); } } _allMeth = true; } }
private CacheItemMethod extractCIM(string name) { CacheItemMethod m = null; if (!_meth.ContainsKey(name)) { IEnumerable<MethodInfo> mi = CU.ExcelRegisteredMethods(ItemType) .Where(w => new CacheItemMethod(w).ExcelName == name); if (mi.Count() > 0) { m = new CacheItemMethod(mi.First()); _meth.Add(name, m); } } else m = _meth[name]; return m; }