@@ -96,6 +96,9 @@ public static CompilationUnitSyntax GetSyntax(bool isDynamicallyAccessedMembersA
96
96
97
97
// Prepare the base attributes with are always present:
98
98
//
99
+ // /// <summary>
100
+ // /// A helper type with generated validation stubs for types deriving from <see cref="global::CommunityToolkit.Mvvm.ComponentModel.ObservableValidator"/>.
101
+ // /// </summary>
99
102
// [global::System.CodeDom.Compiler.GeneratedCode("...", "...")]
100
103
// [global::System.Diagnostics.DebuggerNonUserCode]
101
104
// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
@@ -105,7 +108,11 @@ public static CompilationUnitSyntax GetSyntax(bool isDynamicallyAccessedMembersA
105
108
AttributeList ( SingletonSeparatedList (
106
109
Attribute ( IdentifierName ( $ "global::System.CodeDom.Compiler.GeneratedCode") ) . AddArgumentListArguments (
107
110
AttributeArgument ( LiteralExpression ( SyntaxKind . StringLiteralExpression , Literal ( typeof ( ObservableValidatorValidateAllPropertiesGenerator ) . FullName ) ) ) ,
108
- AttributeArgument ( LiteralExpression ( SyntaxKind . StringLiteralExpression , Literal ( typeof ( ObservableValidatorValidateAllPropertiesGenerator ) . Assembly . GetName ( ) . Version . ToString ( ) ) ) ) ) ) ) ) ;
111
+ AttributeArgument ( LiteralExpression ( SyntaxKind . StringLiteralExpression , Literal ( typeof ( ObservableValidatorValidateAllPropertiesGenerator ) . Assembly . GetName ( ) . Version . ToString ( ) ) ) ) ) ) )
112
+ . WithOpenBracketToken ( Token ( TriviaList (
113
+ Comment ( "/// <summary>" ) ,
114
+ Comment ( "/// A helper type with generated validation stubs for types deriving from <see cref=\" global::CommunityToolkit.Mvvm.ComponentModel.ObservableValidator\" />." ) ,
115
+ Comment ( "/// </summary>" ) ) , SyntaxKind . OpenBracketToken , TriviaList ( ) ) ) ) ;
109
116
attributes . Add ( AttributeList ( SingletonSeparatedList ( Attribute ( IdentifierName ( "global::System.Diagnostics.DebuggerNonUserCode" ) ) ) ) ) ;
110
117
attributes . Add ( AttributeList ( SingletonSeparatedList ( Attribute ( IdentifierName ( "global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage" ) ) ) ) ) ;
111
118
attributes . Add (
@@ -176,8 +183,14 @@ public static CompilationUnitSyntax GetSyntax(ValidationInfo validationInfo)
176
183
// #pragma warning disable
177
184
// namespace CommunityToolkit.Mvvm.ComponentModel.__Internals
178
185
// {
186
+ // /// <inheritdoc/>
179
187
// partial class __ObservableValidatorExtensions
180
188
// {
189
+ // /// <summary>
190
+ // /// Creates a validation stub for <see cref="<INSTANCE_TYPE>"/> objects.
191
+ // /// </summary>
192
+ // /// <param name="_">Dummy parameter, only used to disambiguate the method signature.</param>
193
+ // /// <returns>A validation stub for <see cref="<INSTANCE_TYPE>"/> objects.</returns>
181
194
// [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
182
195
// [global::System.Obsolete("This method is not intended to be called directly by user code")]
183
196
// public static global::System.Action<object> CreateAllPropertiesValidator(<INSTANCE_TYPE> _)
@@ -197,13 +210,20 @@ public static CompilationUnitSyntax GetSyntax(ValidationInfo validationInfo)
197
210
NamespaceDeclaration ( IdentifierName ( "CommunityToolkit.Mvvm.ComponentModel.__Internals" ) ) . WithLeadingTrivia ( TriviaList (
198
211
Comment ( "// <auto-generated/>" ) ,
199
212
Trivia ( PragmaWarningDirectiveTrivia ( Token ( SyntaxKind . DisableKeyword ) , true ) ) ) ) . AddMembers (
200
- ClassDeclaration ( "__ObservableValidatorExtensions" ) . AddModifiers ( Token ( SyntaxKind . PartialKeyword ) ) . AddMembers (
213
+ ClassDeclaration ( "__ObservableValidatorExtensions" ) . AddModifiers (
214
+ Token ( TriviaList ( Comment ( "/// <inheritdoc/>" ) ) , SyntaxKind . PartialKeyword , TriviaList ( ) ) ) . AddMembers (
201
215
MethodDeclaration (
202
216
GenericName ( "global::System.Action" ) . AddTypeArgumentListArguments ( PredefinedType ( Token ( SyntaxKind . ObjectKeyword ) ) ) ,
203
217
Identifier ( "CreateAllPropertiesValidator" ) ) . AddAttributeLists (
204
218
AttributeList ( SingletonSeparatedList (
205
219
Attribute ( IdentifierName ( "global::System.ComponentModel.EditorBrowsable" ) ) . AddArgumentListArguments (
206
- AttributeArgument ( ParseExpression ( "global::System.ComponentModel.EditorBrowsableState.Never" ) ) ) ) ) ,
220
+ AttributeArgument ( ParseExpression ( "global::System.ComponentModel.EditorBrowsableState.Never" ) ) ) ) )
221
+ . WithOpenBracketToken ( Token ( TriviaList (
222
+ Comment ( "/// <summary>" ) ,
223
+ Comment ( $ "/// Creates a validation stub for <see cref=\" { validationInfo . TypeName } \" /> objects.") ,
224
+ Comment ( "/// </summary>" ) ,
225
+ Comment ( "/// <param name=\" _\" >Dummy parameter, only used to disambiguate the method signature.</param>" ) ,
226
+ Comment ( $ "/// <returns>A validation stub for <see cref=\" { validationInfo . TypeName } \" /> objects.</returns>") ) , SyntaxKind . OpenBracketToken , TriviaList ( ) ) ) ,
207
227
AttributeList ( SingletonSeparatedList (
208
228
Attribute ( IdentifierName ( "global::System.Obsolete" ) ) . AddArgumentListArguments (
209
229
AttributeArgument ( LiteralExpression (
0 commit comments