@@ -196,15 +196,15 @@ public void GenerateCode(SourceProductionContext context)
196196 LiteralExpression ( SyntaxKind . NumericLiteralExpression , Literal ( 1 ) ) ) ) )
197197 . WithSemicolonToken ( Token ( SyntaxKind . SemicolonToken ) ) ,
198198
199- FieldDeclaration (
200- VariableDeclaration ( IdentifierName ( typeName . FullName ) )
201- . WithVariables (
202- [
203- VariableDeclarator ( Identifier ( "Value" ) )
204- ] ) )
205- . WithModifiers ( TokenList ( Token ( SyntaxKind . PublicKeyword ) ,
206- Token ( SyntaxKind . ReadOnlyKeyword ) ) )
207- . WithAttributeLists ( [ GeneratedCodeAttribute ( typeof ( QuantityStructGenerator ) ) ] ) ,
199+ PropertyDeclaration ( IdentifierName ( typeName . FullName ) , Identifier ( "Value" ) )
200+ . WithModifiers ( TokenList ( Token ( SyntaxKind . PublicKeyword ) ) )
201+ . WithAttributeLists ( [ GeneratedCodeAttribute ( typeof ( QuantityStructGenerator ) ) ] )
202+ . WithXmlCommentInheritDoc ( ( string ? ) null )
203+ . WithAccessorList ( AccessorList (
204+ [
205+ AccessorDeclaration ( SyntaxKind . GetAccessorDeclaration )
206+ . WithSemicolonToken ( Token ( SyntaxKind . SemicolonToken ) )
207+ ] ) ) ,
208208
209209 ConstructorDeclaration ( Identifier ( quantity . Name ) )
210210 . WithModifiers ( TokenList ( Token ( quantity . IsNoDimensions
@@ -462,7 +462,7 @@ public void GenerateCode(SourceProductionContext context)
462462 . WithSemicolonToken ( Token ( SyntaxKind . SemicolonToken ) ) ,
463463
464464 ConversionOperatorDeclaration (
465- Token ( quantitySymbol ? . GetAttributes ( ) . Any ( a => a . AttributeClass ? . GetName ( ) . FullName
465+ Token ( quantitySymbol ? . GetAttributes ( ) . Any ( a => a . AttributeClass ? . GetName ( ) . FullName
466466 is "global::TedToolkit.Quantities.QuantityImplicitFromValueTypeAttribute" ) ?? false
467467 ? SyntaxKind . ImplicitKeyword
468468 : SyntaxKind . ExplicitKeyword ) ,
0 commit comments