|
4 | 4 | /// With FuncEvent the operands += and -= can be used to attach and detach .Net callbacks to Javascript events.<br/> |
5 | 5 | /// All reference handling is done automatically when events are added and removed.<br/> |
6 | 6 | /// Parameters of event handlers may be omitted if not required.<br/> |
7 | | - /// FuncEvent works just like ActionEvent but allows a return value. |
| 7 | + /// FuncEvent works just like ActionEvent but allows a return value.<br/> |
| 8 | + /// <br/> |
| 9 | + /// <b>IMPORTANT: Every += must have a matching -= before the JSObject is disposed.</b><br/> |
| 10 | + /// Failing to unsubscribe before disposal will cause the JavaScript callback to persist,<br/> |
| 11 | + /// leading to memory leaks and potential calls into disposed .NET objects which can<br/> |
| 12 | + /// trigger unhandled exceptions (e.g., Blazor error UI in WASM). |
8 | 13 | /// </summary> |
9 | 14 | public class FuncEvent<TResult> : CallbackEvent |
10 | 15 | { |
@@ -71,7 +76,12 @@ public virtual void Off(Func<TResult> listener) |
71 | 76 | /// With FuncEvent the operands += and -= can be used to attach and detach .Net callbacks to Javascript events.<br/> |
72 | 77 | /// All reference handling is done automatically when events are added and removed.<br/> |
73 | 78 | /// Parameters of event handlers may be omitted if not required.<br/> |
74 | | - /// FuncEvent works just like ActionEvent but allows a return value. |
| 79 | + /// FuncEvent works just like ActionEvent but allows a return value.<br/> |
| 80 | + /// <br/> |
| 81 | + /// <b>IMPORTANT: Every += must have a matching -= before the JSObject is disposed.</b><br/> |
| 82 | + /// Failing to unsubscribe before disposal will cause the JavaScript callback to persist,<br/> |
| 83 | + /// leading to memory leaks and potential calls into disposed .NET objects which can<br/> |
| 84 | + /// trigger unhandled exceptions (e.g., Blazor error UI in WASM). |
75 | 85 | /// </summary> |
76 | 86 | public class FuncEvent<T1, TResult> : FuncEvent<TResult> |
77 | 87 | { |
@@ -157,7 +167,12 @@ public virtual void Off(Func<T1, TResult> listener) |
157 | 167 | /// With FuncEvent the operands += and -= can be used to attach and detach .Net callbacks to Javascript events.<br/> |
158 | 168 | /// All reference handling is done automatically when events are added and removed.<br/> |
159 | 169 | /// Parameters of event handlers may be omitted if not required.<br/> |
160 | | - /// FuncEvent works just like ActionEvent but allows a return value. |
| 170 | + /// FuncEvent works just like ActionEvent but allows a return value.<br/> |
| 171 | + /// <br/> |
| 172 | + /// <b>IMPORTANT: Every += must have a matching -= before the JSObject is disposed.</b><br/> |
| 173 | + /// Failing to unsubscribe before disposal will cause the JavaScript callback to persist,<br/> |
| 174 | + /// leading to memory leaks and potential calls into disposed .NET objects which can<br/> |
| 175 | + /// trigger unhandled exceptions (e.g., Blazor error UI in WASM). |
161 | 176 | /// </summary> |
162 | 177 | public class FuncEvent<T1, T2, TResult> : FuncEvent<T1, TResult> |
163 | 178 | { |
@@ -262,7 +277,12 @@ public virtual void Off(Func<T1, T2, TResult> listener) |
262 | 277 | /// With FuncEvent the operands += and -= can be used to attach and detach .Net callbacks to Javascript events.<br/> |
263 | 278 | /// All reference handling is done automatically when events are added and removed.<br/> |
264 | 279 | /// Parameters of event handlers may be omitted if not required.<br/> |
265 | | - /// FuncEvent works just like ActionEvent but allows a return value. |
| 280 | + /// FuncEvent works just like ActionEvent but allows a return value.<br/> |
| 281 | + /// <br/> |
| 282 | + /// <b>IMPORTANT: Every += must have a matching -= before the JSObject is disposed.</b><br/> |
| 283 | + /// Failing to unsubscribe before disposal will cause the JavaScript callback to persist,<br/> |
| 284 | + /// leading to memory leaks and potential calls into disposed .NET objects which can<br/> |
| 285 | + /// trigger unhandled exceptions (e.g., Blazor error UI in WASM). |
266 | 286 | /// </summary> |
267 | 287 | public class FuncEvent<T1, T2, T3, TResult> : FuncEvent<T1, T2, TResult> |
268 | 288 | { |
@@ -386,7 +406,12 @@ public virtual void Off(Func<T1, T2, T3, TResult> listener) |
386 | 406 | /// With FuncEvent the operands += and -= can be used to attach and detach .Net callbacks to Javascript events.<br/> |
387 | 407 | /// All reference handling is done automatically when events are added and removed.<br/> |
388 | 408 | /// Parameters of event handlers may be omitted if not required.<br/> |
389 | | - /// FuncEvent works just like ActionEvent but allows a return value. |
| 409 | + /// FuncEvent works just like ActionEvent but allows a return value.<br/> |
| 410 | + /// <br/> |
| 411 | + /// <b>IMPORTANT: Every += must have a matching -= before the JSObject is disposed.</b><br/> |
| 412 | + /// Failing to unsubscribe before disposal will cause the JavaScript callback to persist,<br/> |
| 413 | + /// leading to memory leaks and potential calls into disposed .NET objects which can<br/> |
| 414 | + /// trigger unhandled exceptions (e.g., Blazor error UI in WASM). |
390 | 415 | /// </summary> |
391 | 416 | public class FuncEvent<T1, T2, T3, T4, TResult> : FuncEvent<T1, T2, T3, TResult> |
392 | 417 | { |
@@ -529,7 +554,12 @@ public virtual void Off(Func<T1, T2, T3, T4, TResult> listener) |
529 | 554 | /// With FuncEvent the operands += and -= can be used to attach and detach .Net callbacks to Javascript events.<br/> |
530 | 555 | /// All reference handling is done automatically when events are added and removed.<br/> |
531 | 556 | /// Parameters of event handlers may be omitted if not required.<br/> |
532 | | - /// FuncEvent works just like ActionEvent but allows a return value. |
| 557 | + /// FuncEvent works just like ActionEvent but allows a return value.<br/> |
| 558 | + /// <br/> |
| 559 | + /// <b>IMPORTANT: Every += must have a matching -= before the JSObject is disposed.</b><br/> |
| 560 | + /// Failing to unsubscribe before disposal will cause the JavaScript callback to persist,<br/> |
| 561 | + /// leading to memory leaks and potential calls into disposed .NET objects which can<br/> |
| 562 | + /// trigger unhandled exceptions (e.g., Blazor error UI in WASM). |
533 | 563 | /// </summary> |
534 | 564 | public class FuncEvent<T1, T2, T3, T4, T5, TResult> : FuncEvent<T1, T2, T3, T4, TResult> |
535 | 565 | { |
@@ -691,7 +721,12 @@ public virtual void Off(Func<T1, T2, T3, T4, T5, TResult> listener) |
691 | 721 | /// With FuncEvent the operands += and -= can be used to attach and detach .Net callbacks to Javascript events.<br/> |
692 | 722 | /// All reference handling is done automatically when events are added and removed.<br/> |
693 | 723 | /// Parameters of event handlers may be omitted if not required.<br/> |
694 | | - /// FuncEvent works just like ActionEvent but allows a return value. |
| 724 | + /// FuncEvent works just like ActionEvent but allows a return value.<br/> |
| 725 | + /// <br/> |
| 726 | + /// <b>IMPORTANT: Every += must have a matching -= before the JSObject is disposed.</b><br/> |
| 727 | + /// Failing to unsubscribe before disposal will cause the JavaScript callback to persist,<br/> |
| 728 | + /// leading to memory leaks and potential calls into disposed .NET objects which can<br/> |
| 729 | + /// trigger unhandled exceptions (e.g., Blazor error UI in WASM). |
695 | 730 | /// </summary> |
696 | 731 | public class FuncEvent<T1, T2, T3, T4, T5, T6, TResult> : FuncEvent<T1, T2, T3, T4, T5, TResult> |
697 | 732 | { |
@@ -872,7 +907,12 @@ public virtual void Off(Func<T1, T2, T3, T4, T5, T6, TResult> listener) |
872 | 907 | /// With FuncEvent the operands += and -= can be used to attach and detach .Net callbacks to Javascript events.<br/> |
873 | 908 | /// All reference handling is done automatically when events are added and removed.<br/> |
874 | 909 | /// Parameters of event handlers may be omitted if not required.<br/> |
875 | | - /// FuncEvent works just like ActionEvent but allows a return value. |
| 910 | + /// FuncEvent works just like ActionEvent but allows a return value.<br/> |
| 911 | + /// <br/> |
| 912 | + /// <b>IMPORTANT: Every += must have a matching -= before the JSObject is disposed.</b><br/> |
| 913 | + /// Failing to unsubscribe before disposal will cause the JavaScript callback to persist,<br/> |
| 914 | + /// leading to memory leaks and potential calls into disposed .NET objects which can<br/> |
| 915 | + /// trigger unhandled exceptions (e.g., Blazor error UI in WASM). |
876 | 916 | /// </summary> |
877 | 917 | public class FuncEvent<T1, T2, T3, T4, T5, T6, T7, TResult> : FuncEvent<T1, T2, T3, T4, T5, T6, TResult> |
878 | 918 | { |
|
0 commit comments