@@ -224,7 +224,7 @@ private void GenerateToString()
224224 var memberType = _state . MemberTypes [ i ] ;
225225
226226 _sb . Append ( @"
227- " ) . Append ( i + 1 ) . Append ( " => this._ " ) . Append ( memberType . BackingFieldName ) ;
227+ " ) . Append ( i + 1 ) . Append ( " => this." ) . Append ( memberType . BackingFieldName ) ;
228228
229229 if ( memberType . SpecialType != SpecialType . System_String )
230230 {
@@ -266,7 +266,7 @@ public override int GetHashCode()
266266 _sb . Append ( @"
267267 " ) . Append ( i + 1 ) . Append ( " => " ) ;
268268
269- _sb . Append ( "global::System.HashCode.Combine(" ) . AppendTypeFullyQualified ( _state ) . Append ( "._typeHashCode, this._ " ) . Append ( memberType . BackingFieldName ) ;
269+ _sb . Append ( "global::System.HashCode.Combine(" ) . AppendTypeFullyQualified ( _state ) . Append ( "._typeHashCode, this." ) . Append ( memberType . BackingFieldName ) ;
270270
271271 if ( memberType . IsReferenceType )
272272 _sb . Append ( "?" ) ;
@@ -348,9 +348,9 @@ public bool Equals(").AppendTypeFullyQualifiedNullAnnotated(_state).Append(@" ot
348348 " ) . Append ( i + 1 ) . Append ( " => " ) ;
349349
350350 if ( memberType . IsReferenceType )
351- _sb . Append ( "this._ " ) . Append ( memberType . BackingFieldName ) . Append ( " is null ? other._ " ) . Append ( memberType . BackingFieldName ) . Append ( " is null : " ) ;
351+ _sb . Append ( "this." ) . Append ( memberType . BackingFieldName ) . Append ( " is null ? other." ) . Append ( memberType . BackingFieldName ) . Append ( " is null : " ) ;
352352
353- _sb . Append ( "this._ " ) . Append ( memberType . BackingFieldName ) . Append ( ".Equals(other._ " ) . Append ( memberType . BackingFieldName ) ;
353+ _sb . Append ( "this." ) . Append ( memberType . BackingFieldName ) . Append ( ".Equals(other." ) . Append ( memberType . BackingFieldName ) ;
354354
355355 if ( memberType . SpecialType == SpecialType . System_String )
356356 _sb . Append ( ", global::System.StringComparison." ) . Append ( Enum . GetName ( typeof ( StringComparison ) , _state . Settings . DefaultStringComparison ) ) ;
@@ -500,7 +500,7 @@ private void GenerateIndexBasedActionSwitchBody(bool withState, bool isPartially
500500 if ( withState )
501501 _sb . Append ( "state, " ) ;
502502
503- _sb . Append ( "this._ " ) . Append ( memberType . BackingFieldName ) . Append ( memberType . IsReferenceType && memberType . NullableAnnotation != NullableAnnotation . Annotated ? "!" : null ) . Append ( @");
503+ _sb . Append ( "this." ) . Append ( memberType . BackingFieldName ) . Append ( memberType . IsReferenceType && memberType . NullableAnnotation != NullableAnnotation . Annotated ? "!" : null ) . Append ( @");
504504 return;" ) ;
505505 }
506506
@@ -661,7 +661,7 @@ private void GenerateIndexBasedFuncSwitchBody(bool withState, bool isPartially)
661661 if ( withState )
662662 _sb . Append ( "state, " ) ;
663663
664- _sb . Append ( "this._ " ) . Append ( memberType . BackingFieldName ) . Append ( memberType is { IsReferenceType : true , Setting . IsNullableReferenceType : false } ? "!" : null ) . Append ( ");" ) ;
664+ _sb . Append ( "this." ) . Append ( memberType . BackingFieldName ) . Append ( memberType is { IsReferenceType : true , Setting . IsNullableReferenceType : false } ? "!" : null ) . Append ( ");" ) ;
665665 }
666666
667667 _sb . Append ( @"
@@ -844,7 +844,7 @@ private void GenerateConstructors()
844844
845845 _sb . Append ( @")
846846 {
847- this._ " ) . Append ( memberType . BackingFieldName ) . Append ( " = " ) . AppendEscaped ( argName ) . Append ( @";
847+ this." ) . Append ( memberType . BackingFieldName ) . Append ( " = " ) . AppendEscaped ( argName ) . Append ( @";
848848 this._valueIndex = " ) ;
849849
850850 if ( hasDuplicates )
@@ -896,7 +896,7 @@ private void GenerateMemberTypeFieldsAndProps()
896896 continue ;
897897
898898 _sb . Append ( @"
899- private readonly " ) . AppendTypeFullyQualifiedNullAnnotated ( memberType ) . Append ( " _ " ) . Append ( memberType . BackingFieldName ) . Append ( ";" ) ;
899+ private readonly " ) . AppendTypeFullyQualifiedNullAnnotated ( memberType ) . Append ( " " ) . Append ( memberType . BackingFieldName ) . Append ( ";" ) ;
900900 }
901901
902902 for ( var i = 0 ; i < _state . MemberTypes . Count ; i ++ )
@@ -920,7 +920,7 @@ private void GenerateMemberTypeFieldsAndProps()
920920 /// </summary>
921921 /// <exception cref=""global::System.InvalidOperationException"">If the current value is not of type " ) . AppendTypeForXmlComment ( memberType ) . Append ( @".</exception>
922922 public " ) . AppendTypeFullyQualified ( memberType ) . Append ( " As" ) . Append ( memberType . Name ) . Append ( " => Is" ) . Append ( memberType . Name )
923- . Append ( " ? this._ " ) . Append ( memberType . BackingFieldName ) . Append ( memberType . IsReferenceType && memberType . NullableAnnotation != NullableAnnotation . Annotated ? "!" : null )
923+ . Append ( " ? this." ) . Append ( memberType . BackingFieldName ) . Append ( memberType . IsReferenceType && memberType . NullableAnnotation != NullableAnnotation . Annotated ? "!" : null )
924924 . Append ( " : throw new global::System.InvalidOperationException($\" '{nameof(" ) . AppendTypeFullyQualified ( _state ) . Append ( ")}' is not of type '" ) . AppendTypeMinimallyQualified ( memberType ) . Append ( "'.\" );" ) ;
925925 }
926926 }
@@ -956,7 +956,7 @@ private void GenerateRawValueGetter()
956956 var memberType = _state . MemberTypes [ i ] ;
957957
958958 _sb . Append ( @"
959- " ) . Append ( i + 1 ) . Append ( " => this._ " ) . Append ( memberType . BackingFieldName ) . Append ( memberType . IsReferenceType && ! hasNullableTypes ? "!" : null ) . Append ( "," ) ;
959+ " ) . Append ( i + 1 ) . Append ( " => this." ) . Append ( memberType . BackingFieldName ) . Append ( memberType . IsReferenceType && ! hasNullableTypes ? "!" : null ) . Append ( "," ) ;
960960 }
961961
962962 _sb . Append ( @"
0 commit comments