Exemplo n.º 1
0
            static private Aspect.Directory.Entry Obtain(MethodBase method)
            {
                var _method = method;

                if (_method.DeclaringType != _method.ReflectedType)
                {
                    if (_method is MethodInfo)
                    {
                        _method = (_method as MethodInfo).GetBaseDefinition();
                    }
                    _method = _method.DeclaringType.FindMembers(MemberTypes.Method, BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.DeclaredOnly, (_Method, _Criteria) => _Method is ConstructorInfo || _Method is MethodInfo && (_Method as MethodInfo).GetBaseDefinition() == _method, null).Single() as MethodBase;
                }
                Aspect.Directory.Entry _entry;
                if (Aspect.Directory.m_Dictionary.TryGetValue(method, out _entry))
                {
                    return(_entry);
                }
                _entry = new Aspect.Directory.Entry(_method.DeclaringType, _method, new Aspect.Activity(_method.DeclaringType, _method));
                Aspect.Directory.m_Dictionary.Add(_method, _entry);
                return(_entry);
            }
Exemplo n.º 2
0
 public Debugger(Aspect.Directory.Entry map)
 {
     this.m_Map = map;
 }
Exemplo n.º 3
0
 static public string Display(Aspect.Directory.Entry map)
 {
     return(string.Concat(map.Type.Declaration(), ".", map.Method.Declaration(), " = ", map.m_Aspectization.Count.ToString()));
 }