Update XML comment for MetadataUpdateHandlerAttribute (#53262)
authorStephen Toub <stoub@microsoft.com>
Wed, 26 May 2021 18:23:36 +0000 (14:23 -0400)
committerGitHub <noreply@github.com>
Wed, 26 May 2021 18:23:36 +0000 (14:23 -0400)
src/libraries/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdateHandlerAttribute.cs

index 594c55d..c66473d 100644 (file)
@@ -7,18 +7,22 @@ namespace System.Reflection.Metadata
 {
     /// <summary>
     /// Specifies a type that should receive notifications of metadata updates.
+    /// </summary>
+    /// <remarks>
     /// <para>
-    /// The <see cref="Type" /> specified by this attribute must have at least one static method with the following signature:
+    /// The <see cref="Type" /> specified by this attribute should implement static methods matching the signature of one or more
+    /// of the following (visibility of the methods does not matter):
     /// <c>static void ClearCache(Type[]? updatedTypes)</c>
     /// <c>static void UpdateApplication(Type[]? updatedTypes)</c>
     /// </para>
     /// <para>
-    /// Once a metadata update is applied, <c>ClearCache</c> is invoked for every handler that specifies one. This gives update handlers
-    /// an opportunity to clear any caches that are inferred based from the application's metadata. This is followed by invoking the <c>UpdateHandler</c>
-    /// method is invoked letting applications update their contents, trigger a UI re-render etc. When specified, the <c>updatedTypes</c>
-    /// parameter indicates the sequence of types that were affected by the metadata update.
+    /// After a metadata update is applied, <c>ClearCache</c> is invoked for every handler that specifies one. This gives update handlers
+    /// an opportunity to clear any caches that are inferred based on the application's metadata. After all <c>ClearCache</c> methods
+    /// have been invoked, <c>UpdateApplication</c> is invoked for every handler that specifies one.  This enables applications to refresh
+    /// application state, trigger a UI re-render, or other such reactions. When specified, the <c>updatedTypes</c> parameter contains the
+    /// set of types that were affected by the metadata update; if it's null, any type may have been updated.
     /// </para>
-    /// </summary>
+    /// </remarks>
     [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
     public sealed class MetadataUpdateHandlerAttribute : Attribute
     {