You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"When this property is set to true, the OnActivated() method will be invoked, which will register all necessary message handlers for this recipient. "+
63
+
"This method requires the generated CommunityToolkit.Mvvm.Messaging.__Internals.__IMessengerExtensions type not to be removed to use the fast path. "+
64
+
"If this type is removed by the linker, or if the target recipient was created dynamically and was missed by the source generator, a slower fallback "+
65
+
"path using a compiled LINQ expression will be used. This will have more overhead in the first invocation of this method for any given recipient type. "+
66
+
"Alternatively, OnActivated() can be manually overwritten, and registration can be done individually for each required message for this recipient.")]
60
67
set
61
68
{
62
69
if(SetProperty(refthis.isActive,value,true))
@@ -84,6 +91,11 @@ public bool IsActive
84
91
/// If you need more fine tuned control, want to register messages individually or just prefer
85
92
/// the lambda-style syntax for message registration, override this method and register manually.
86
93
/// </remarks>
94
+
[RequiresUnreferencedCode(
95
+
"This method requires the generated CommunityToolkit.Mvvm.Messaging.__Internals.__IMessengerExtensions type not to be removed to use the fast path. "+
96
+
"If this type is removed by the linker, or if the target recipient was created dynamically and was missed by the source generator, a slower fallback "+
97
+
"path using a compiled LINQ expression will be used. This will have more overhead in the first invocation of this method for any given recipient type. "+
98
+
"Alternatively, OnActivated() can be manually overwritten, and registration can be done individually for each required message for this recipient.")]
@@ -169,6 +173,7 @@ protected bool SetProperty<T>([NotNullIfNotNull("newValue")] ref T field, T newV
169
173
/// <param name="propertyName">(optional) The name of the property that changed.</param>
170
174
/// <returns><see langword="true"/> if the property was changed, <see langword="false"/> otherwise.</returns>
171
175
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="comparer"/> or <paramref name="propertyName"/> are <see langword="null"/>.</exception>
176
+
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
@@ -205,6 +210,7 @@ protected bool SetProperty<T>([NotNullIfNotNull("newValue")] ref T field, T newV
205
210
/// are not raised if the current and new value for the target property are the same.
206
211
/// </remarks>
207
212
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="callback"/> or <paramref name="propertyName"/> are <see langword="null"/>.</exception>
213
+
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
@@ -235,6 +241,7 @@ protected bool SetProperty<T>(T oldValue, T newValue, Action<T> callback, bool v
235
241
/// <param name="propertyName">(optional) The name of the property that changed.</param>
236
242
/// <returns><see langword="true"/> if the property was changed, <see langword="false"/> otherwise.</returns>
237
243
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="comparer"/>, <paramref name="callback"/> or <paramref name="propertyName"/> are <see langword="null"/>.</exception>
244
+
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
/// <param name="propertyName">(optional) The name of the property that changed.</param>
270
277
/// <returns><see langword="true"/> if the property was changed, <see langword="false"/> otherwise.</returns>
271
278
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="model"/>, <paramref name="callback"/> or <paramref name="propertyName"/> are <see langword="null"/>.</exception>
279
+
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
@@ -355,6 +365,7 @@ protected bool TrySetProperty<T>(ref T field, T newValue, out IReadOnlyCollectio
355
365
/// <param name="propertyName">(optional) The name of the property that changed.</param>
356
366
/// <returns>Whether the validation was successful and the property value changed as well.</returns>
357
367
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="comparer"/> or <paramref name="propertyName"/> are <see langword="null"/>.</exception>
368
+
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
@@ -376,6 +387,7 @@ protected bool TrySetProperty<T>(ref T field, T newValue, IEqualityComparer<T> c
376
387
/// <param name="propertyName">(optional) The name of the property that changed.</param>
377
388
/// <returns>Whether the validation was successful and the property value changed as well.</returns>
378
389
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="callback"/> or <paramref name="propertyName"/> are <see langword="null"/>.</exception>
390
+
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
@@ -398,6 +410,7 @@ protected bool TrySetProperty<T>(T oldValue, T newValue, Action<T> callback, out
398
410
/// <param name="propertyName">(optional) The name of the property that changed.</param>
399
411
/// <returns>Whether the validation was successful and the property value changed as well.</returns>
400
412
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="comparer"/>, <paramref name="callback"/> or <paramref name="propertyName"/> are <see langword="null"/>.</exception>
413
+
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
@@ -422,6 +435,7 @@ protected bool TrySetProperty<T>(T oldValue, T newValue, IEqualityComparer<T> co
422
435
/// <param name="propertyName">(optional) The name of the property that changed.</param>
423
436
/// <returns>Whether the validation was successful and the property value changed as well.</returns>
424
437
/// <exception cref="System.ArgumentNullException">Thrown if <paramref name="model"/>, <paramref name="callback"/> or <paramref name="propertyName"/> are <see langword="null"/>.</exception>
438
+
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
/// members in the current instance will be ignored. None of the processed properties
524
539
/// will be modified - they will only be used to retrieve their values and validate them.
525
540
/// </remarks>
541
+
[RequiresUnreferencedCode(
542
+
"This method requires the generated CommunityToolkit.Mvvm.ComponentModel.__Internals.__ObservableValidatorExtensions type not to be removed to use the fast path. "+
543
+
"If this type is removed by the linker, or if the target recipient was created dynamically and was missed by the source generator, a slower fallback "+
544
+
"path using a compiled LINQ expression will be used. This will have more overhead in the first invocation of this method for any given recipient type. "+
545
+
"Additionally, due to the usage of validation APIs, the type of the current instance cannot be statically discovered.")]
526
546
protectedvoidValidateAllProperties()
527
547
{
548
+
#pragma warning disable IL2026
528
549
// Fast path that tries to create a delegate from a generated type-specific method. This
529
550
// is used to make this method more AOT-friendly and faster, as there is no dynamic code.
0 commit comments