| 17 | private Dictionary<string, Dictionary<int, List<MethodInfo>>> m_genInstanceMethods; |
| 18 | |
| 19 | private ExposedObject(object obj) |
| 20 | { |
| 21 | m_object = obj; |
| 22 | m_type = obj.GetType(); |
| 23 | |
| 24 | m_instanceMethods = |
| 25 | m_type |
| 26 | .GetMethods(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance) |
| 27 | .Where(m => !m.IsGenericMethod) |
| 28 | .GroupBy(m => m.Name) |
| 29 | .ToDictionary( |
| 30 | p => p.Key, |
| 31 | p => p.GroupBy(r => r.GetParameters().Length).ToDictionary(r => r.Key, r => r.ToList())); |
| 32 | |
| 33 | m_genInstanceMethods = |
| 34 | m_type |
| 35 | .GetMethods(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance) |
| 36 | .Where(m => m.IsGenericMethod) |
| 37 | .GroupBy(m => m.Name) |
| 38 | .ToDictionary( |
| 39 | p => p.Key, |
| 40 | p => p.GroupBy(r => r.GetParameters().Length).ToDictionary(r => r.Key, r => r.ToList())); |
| 41 | } |
| 42 | |
| 43 | public object Object { get { return m_object; } } |
| 44 | |