Exemple #1
0
 /// <summary>
 /// Creates a closed generic method from this (presumably) open generic method
 /// </summary>
 /// <param name="types">The method type arguments</param>
 /// <returns></returns>
 public ClrMethod Close(params Type[] types)
 => ReflectedElement.MakeGenericMethod(types);
Exemple #2
0
 /// <summary>
 /// If the adapted method is a generic method definition with the supplied number and
 /// type of parameters, closes the method with the supplied arguments
 /// </summary>
 /// <param name="args"></param>
 /// <returns></returns>
 public Option <ClrMethod> CloseGenericMethod(params ClrType[] args)
 => Try(() => ClrMethod.Get(ReflectedElement.MakeGenericMethod(array(args, a => a.ReflectedElement))));