fix code gen property never set
This commit is contained in:
		
							parent
							
								
									bc12158014
								
							
						
					
					
						commit
						d4d1f2f981
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -2,4 +2,5 @@ bin | |||
| obj | ||||
| .idea | ||||
| client | ||||
| *.sarif | ||||
| 
 | ||||
|  |  | |||
|  | @ -166,6 +166,8 @@ public class StructEndiannessSourceGenerator : ISourceGenerator | |||
|             name: IdentifierName("ReverseEndianness") | ||||
|         ); | ||||
| 
 | ||||
|         var valueIdentifier = IdentifierName("value"); | ||||
| 
 | ||||
|         return PropertyDeclaration(ParseTypeName(typeName), propertyName) | ||||
|             .WithModifiers(TokenList([Token(SyntaxKind.PublicKeyword)])) | ||||
|             .WithAccessorList(AccessorList(List<AccessorDeclarationSyntax>([ | ||||
|  | @ -187,11 +189,11 @@ public class StructEndiannessSourceGenerator : ISourceGenerator | |||
|                         left: fieldIdentifier, | ||||
|                         right: ConditionalExpression( | ||||
|                             condition: condition, | ||||
|                             whenTrue: fieldIdentifier, | ||||
|                             whenTrue: valueIdentifier, | ||||
|                             whenFalse: InvocationExpression( | ||||
|                                 expression: reverseEndiannessMethod, | ||||
|                                 argumentList: ArgumentList(SingletonSeparatedList( | ||||
|                                     Argument(IdentifierName("value")) | ||||
|                                     Argument(valueIdentifier) | ||||
|                                 )) | ||||
|                             ) | ||||
|                         ) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vinzenz Schroeter
						Vinzenz Schroeter