Пример #1
0
 public static MethodInfo Resolve(ReflectionToken token)
 {
     MethodInfo result;
     if (!Methods.TryGetValue(token, out result))
             throw new SLSharpException("Binding does not support " + token);
     return result;
 }
Пример #2
0
        public static MethodInfo Resolve(ReflectionToken token)
        {
            MethodInfo result;

            if (!Methods.TryGetValue(token, out result))
            {
                throw new SLSharpException("Binding does not support " + token);
            }
            return(result);
        }
Пример #3
0
        public static MethodInfo FindMethod(Type t, ReflectionToken token)
        {
            if (t == null)
                throw new ArgumentNullException("t");

            return (from m in t.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)
                    let attr = m.GetCustomAttributes(typeof(ReflectionMarkerAttribute), false)
                    where attr.Length != 0
                    let att = (ReflectionMarkerAttribute)attr[0]
                    where att.Token == token
                    select m).Single();
        }
Пример #4
0
        public static MethodInfo FindMethod(Type t, ReflectionToken token)
        {
            if (t == null)
            {
                throw new ArgumentNullException("t");
            }

            return((from m in t.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)
                    let attr = m.GetCustomAttributes(typeof(ReflectionMarkerAttribute), false)
                               where attr.Length != 0
                               let att = (ReflectionMarkerAttribute)attr[0]
                                         where att.Token == token
                                         select m).Single());
        }
Пример #5
0
 public ReflectionMarkerAttribute(ReflectionToken token)
 {
     Token = token;
 }
Пример #6
0
 public ReflectionMarkerAttribute(ReflectionToken token)
 {
     Token = token;
 }
Пример #7
0
 public PropInfo(Type type, ReflectionToken token)
 {
     Type  = type;
     Token = token;
 }