Esempio n. 1
0
 /// <summary>
 /// Gets a global method
 /// </summary>
 /// <param name="name">Method name</param>
 /// <param name="bindingAttr">Binding attributes</param>
 /// <param name="callConvention">Calling convention</param>
 /// <param name="types">Method parameter types or null</param>
 /// <returns></returns>
 public DmdMethodInfo GetMethod(string name, DmdBindingFlags bindingAttr, DmdCallingConventions callConvention, IList <DmdType> types)
 {
     if (types == null)
     {
         return(GlobalType.GetMethod(name, bindingAttr));
     }
     return(GlobalType.GetMethod(name, bindingAttr, callConvention, types));
 }
Esempio n. 2
0
 /// <summary>
 /// Gets a global method
 /// </summary>
 /// <param name="name">Method name</param>
 /// <param name="bindingAttr">Binding attributes</param>
 /// <param name="callConvention">Calling convention</param>
 /// <param name="types">Method parameter types or null</param>
 /// <returns></returns>
 public DmdMethodInfo GetMethod(string name, DmdBindingFlags bindingAttr, DmdCallingConventions callConvention, IList <Type> types) =>
 GetMethod(name, bindingAttr, callConvention, types.ToDmdType(AppDomain));
Esempio n. 3
0
 public static bool IsMatch(DmdMethodBase method, DmdBindingFlags bindingAttr, DmdCallingConventions callConvention) =>
 IsMatch(method, bindingAttr) && IsMatch(method, callConvention);
Esempio n. 4
0
 public static bool IsMatch(DmdMethodBase method, DmdBindingFlags bindingAttr, DmdCallingConventions callConvention, IList <DmdType> types)
 {
     if (!IsMatch(method, bindingAttr, callConvention))
     {
         return(false);
     }
     return(IsMatch(method, types));
 }
Esempio n. 5
0
 static bool IsMatch(DmdMethodBase method, DmdCallingConventions callConvention) =>
 callConvention == DmdCallingConventions.Any ||
 (method.CallingConvention & DmdCallingConventions.Any) == (callConvention & DmdCallingConventions.Any);