| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 77e9bcb commit aa8e833
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,16 @@ namespace Python.Runtime | |||
| 10 | 10 | { | |
| 11 | 11 | using MaybeMethodBase = MaybeMethodBase<MethodBase>; | |
| 12 | 12 | ||
| 13 | + /// <summary> | ||
| 14 | + /// Delegate for custom coercion logic during Python method binding. | ||
| 15 | + /// </summary> | ||
| 16 | + /// <param name="arguments">A dictionary containing the Python arguments passed to the method.</param> | ||
| 17 | + /// <param name="methods">An array of method overloads being considered for binding.</param> | ||
| 18 | + /// <param name="foundBinding"> | ||
| 19 | + /// A reference to the method that was successfully bound. This can be modified by the delegate | ||
| 20 | + /// to override the default binding logic. The delegate can set this to null to disable the method call | ||
| 21 | + /// and report an error. | ||
| 22 | + /// </param> | ||
| 13 | 23 | public delegate void MethodBinderCoerceBindDelegate( | |
| 14 | 24 | Dictionary<string, PyObject> arguments, | |
| 15 | 25 | MethodBase[] methods, | |
@@ -1088,8 +1098,14 @@ static internal class ParameterInfoExtensions | |||
| 1088 | 1098 | } | |
| 1089 | 1099 | } | |
| 1090 | 1100 | ||
| 1101 | + /// <summary> | ||
| 1102 | + /// Provides events related to method binding in the MethodBinder class. | ||
| 1103 | + /// </summary> | ||
| 1091 | 1104 | public static class MethodBinderEvents | |
| 1092 | 1105 | { | |
| 1106 | + /// <summary> | ||
| 1107 | + /// Event triggered to allow custom coercion logic during method binding. | ||
| 1108 | + /// </summary> | ||
| 1093 | 1109 | public static MethodBinderCoerceBindDelegate? CoerceBind; | |
| 1094 | 1110 | } | |
| 1095 | 1111 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments