Esempio n. 1
0
        public MethodInterpreter GetMethodImplementation(MethodBase method)
        {
            var key = new MethodBaseKey(method);
            MethodInterpreter result;

            return(MethodImplementations.TryGetValue(key, out result) ? result : null);
        }
 /// <summary>
 /// Invoked by the generation process to determine if the specified method should be proxied.
 /// </summary>
 /// <param name="type">The type which declares the given method.</param>
 /// <param name="methodInfo">The method to inspect.</param>
 /// <returns>
 /// True if the given method should be proxied; false otherwise.
 /// </returns>
 public bool ShouldInterceptMethod(Type type, MethodInfo methodInfo)
 {
     return(MethodImplementations.Any(i => i.MethodToImplement == methodInfo));
 }