(TypeBuilder type_builder, MethodInfo to_be_impl, MethodAttributes attributes, string methodName = null)
| 626 | } |
| 627 | |
| 628 | private MethodBuilder defineImplementMethod(TypeBuilder type_builder, MethodInfo to_be_impl, MethodAttributes attributes, string methodName = null) |
| 629 | { |
| 630 | var parameters = to_be_impl.GetParameters(); |
| 631 | |
| 632 | Type[] param_types = new Type[parameters.Length]; |
| 633 | for (int i = 0; i < parameters.Length; ++i) |
| 634 | { |
| 635 | param_types[i] = parameters[i].ParameterType; |
| 636 | } |
| 637 | |
| 638 | var method_builder = type_builder.DefineMethod(methodName == null ? to_be_impl.Name : methodName, attributes, to_be_impl.ReturnType, param_types); |
| 639 | for (int i = 0; i < parameters.Length; ++i) |
| 640 | { |
| 641 | method_builder.DefineParameter(i + 1, parameters[i].Attributes, parameters[i].Name); |
| 642 | } |
| 643 | return method_builder; |
| 644 | } |
| 645 | |
| 646 | ConstructorInfo decimalConstructor = typeof(decimal).GetConstructor(new Type[] { |
| 647 | typeof(int), typeof(int), typeof(int), typeof(bool), typeof(byte) |
nothing calls this directly
no test coverage detected