File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ public static MemberDeclarationSyntax GetSyntax(PropertyInfo propertyInfo)
311
311
//
312
312
// // <auto-generated/>
313
313
// #pragma warning disable
314
+ // #nullable enable
314
315
// namespace CommunityToolkit.Mvvm.ComponentModel.__Internals
315
316
// {
316
317
// [global::System.CodeDom.Compiler.GeneratedCode("...", "...")]
@@ -327,7 +328,8 @@ public static MemberDeclarationSyntax GetSyntax(PropertyInfo propertyInfo)
327
328
CompilationUnit ( ) . AddMembers (
328
329
NamespaceDeclaration ( IdentifierName ( "CommunityToolkit.Mvvm.ComponentModel.__Internals" ) ) . WithLeadingTrivia ( TriviaList (
329
330
Comment ( "// <auto-generated/>" ) ,
330
- Trivia ( PragmaWarningDirectiveTrivia ( Token ( SyntaxKind . DisableKeyword ) , true ) ) ) ) . AddMembers (
331
+ Trivia ( PragmaWarningDirectiveTrivia ( Token ( SyntaxKind . DisableKeyword ) , true ) ) ,
332
+ Trivia ( NullableDirectiveTrivia ( Token ( SyntaxKind . EnableKeyword ) , true ) ) ) ) . AddMembers (
331
333
ClassDeclaration ( ContainingTypeName ) . AddModifiers (
332
334
Token ( SyntaxKind . InternalKeyword ) ,
333
335
Token ( SyntaxKind . StaticKeyword ) ) . AddAttributeLists (
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public CompilationUnitSyntax GetCompilationUnit(
61
61
//
62
62
// <auto-generated/>
63
63
// #pragma warning disable
64
- //
64
+ // #nullable enable
65
65
// namespace <NAMESPACE>
66
66
// {
67
67
// <TYPE_HIERARCHY>
@@ -71,7 +71,8 @@ public CompilationUnitSyntax GetCompilationUnit(
71
71
NamespaceDeclaration ( IdentifierName ( Namespace ) )
72
72
. WithLeadingTrivia ( TriviaList (
73
73
Comment ( "// <auto-generated/>" ) ,
74
- Trivia ( PragmaWarningDirectiveTrivia ( Token ( SyntaxKind . DisableKeyword ) , true ) ) ) )
74
+ Trivia ( PragmaWarningDirectiveTrivia ( Token ( SyntaxKind . DisableKeyword ) , true ) ) ,
75
+ Trivia ( NullableDirectiveTrivia ( Token ( SyntaxKind . EnableKeyword ) , true ) ) ) )
75
76
. AddMembers ( typeDeclarationSyntax ) )
76
77
. NormalizeWhitespace ( eol : "\n " ) ;
77
78
}
You can’t perform that action at this time.
0 commit comments