public DynamicMemberHandle(PropertyInfo info) : this( info.Name, info.PropertyType, DynamicMethodHandlerFactory.CreatePropertyGetter(info), DynamicMethodHandlerFactory.CreatePropertySetter(info)) { }
public DynamicMemberHandle(FieldInfo info) : this( info.Name, info.FieldType, DynamicMethodHandlerFactory.CreateFieldGetter(info), DynamicMethodHandlerFactory.CreateFieldSetter(info)) { }
public DynamicMethodHandle(MethodInfo method) { if (method == null) { throw new ArgumentNullException("info"); } this.Method = method; var parameters = method.GetParameters(); this.MethodParamsLength = parameters.Length; if (MethodCaller.IsLastArray(parameters)) { this.HasFinalArrayParam = true; this.FinalArrayElementType = parameters[parameters.Length - 1].ParameterType.GetElementType(); } this.DynamicMethod = DynamicMethodHandlerFactory.CreateMethod(method); }