コード例 #1
0
ファイル: Aspect.Directory.cs プロジェクト: Virtuoze/Neptune
            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);
            }
コード例 #2
0
 public Debugger(Aspect.Directory.Entry map)
 {
     this.m_Map = map;
 }
コード例 #3
0
 static public string Display(Aspect.Directory.Entry map)
 {
     return(string.Concat(map.Type.Declaration(), ".", map.Method.Declaration(), " = ", map.m_Aspectization.Count.ToString()));
 }