mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	Use .generated suffix for generated C# code
				
					
				
			Use the `.generated` suffix instead of `_Generated` so .NET marks C# file generated by Godot source generators as generated code.
This commit is contained in:
		
							parent
							
								
									0b627c4133
								
							
						
					
					
						commit
						687633e5bd
					
				
					 7 changed files with 10 additions and 10 deletions
				
			
		|  | @ -56,7 +56,7 @@ namespace GodotPlugins.Game | ||||||
| } | } | ||||||
| ";
 | ";
 | ||||||
| 
 | 
 | ||||||
|             context.AddSource("GodotPlugins.Game_Generated", |             context.AddSource("GodotPlugins.Game.generated", | ||||||
|                 SourceText.From(source, Encoding.UTF8)); |                 SourceText.From(source, Encoding.UTF8)); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -87,7 +87,7 @@ namespace Godot.SourceGenerators | ||||||
|             bool isInnerClass = symbol.ContainingType != null; |             bool isInnerClass = symbol.ContainingType != null; | ||||||
| 
 | 
 | ||||||
|             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() |             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() | ||||||
|                                 + "_ScriptMethods_Generated"; |                                 + "_ScriptMethods.generated"; | ||||||
| 
 | 
 | ||||||
|             var source = new StringBuilder(); |             var source = new StringBuilder(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -96,8 +96,8 @@ namespace Godot.SourceGenerators | ||||||
|                 string.Empty; |                 string.Empty; | ||||||
|             bool hasNamespace = classNs.Length != 0; |             bool hasNamespace = classNs.Length != 0; | ||||||
| 
 | 
 | ||||||
|             var uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() |             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() | ||||||
|                              + "_ScriptPath_Generated"; |                              + "_ScriptPath.generated"; | ||||||
| 
 | 
 | ||||||
|             var source = new StringBuilder(); |             var source = new StringBuilder(); | ||||||
| 
 | 
 | ||||||
|  | @ -126,7 +126,7 @@ namespace Godot.SourceGenerators | ||||||
|                 source.Append("\n}\n"); |                 source.Append("\n}\n"); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             context.AddSource(uniqueHint.ToString(), SourceText.From(source.ToString(), Encoding.UTF8)); |             context.AddSource(uniqueHint, SourceText.From(source.ToString(), Encoding.UTF8)); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         private static void AddScriptTypesAssemblyAttr(GeneratorExecutionContext context, |         private static void AddScriptTypesAssemblyAttr(GeneratorExecutionContext context, | ||||||
|  | @ -157,7 +157,7 @@ namespace Godot.SourceGenerators | ||||||
| 
 | 
 | ||||||
|             sourceBuilder.Append("})]\n"); |             sourceBuilder.Append("})]\n"); | ||||||
| 
 | 
 | ||||||
|             context.AddSource("AssemblyScriptTypes_Generated", |             context.AddSource("AssemblyScriptTypes.generated", | ||||||
|                 SourceText.From(sourceBuilder.ToString(), Encoding.UTF8)); |                 SourceText.From(sourceBuilder.ToString(), Encoding.UTF8)); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ namespace Godot.SourceGenerators | ||||||
|             bool isInnerClass = symbol.ContainingType != null; |             bool isInnerClass = symbol.ContainingType != null; | ||||||
| 
 | 
 | ||||||
|             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() |             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() | ||||||
|                                 + "_ScriptProperties_Generated"; |                                 + "_ScriptProperties.generated"; | ||||||
| 
 | 
 | ||||||
|             var source = new StringBuilder(); |             var source = new StringBuilder(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ namespace Godot.SourceGenerators | ||||||
|             bool isInnerClass = symbol.ContainingType != null; |             bool isInnerClass = symbol.ContainingType != null; | ||||||
| 
 | 
 | ||||||
|             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() |             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() | ||||||
|                                 + "_ScriptPropertyDefVal_Generated"; |                                 + "_ScriptPropertyDefVal.generated"; | ||||||
| 
 | 
 | ||||||
|             var source = new StringBuilder(); |             var source = new StringBuilder(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ namespace Godot.SourceGenerators | ||||||
|             bool isInnerClass = symbol.ContainingType != null; |             bool isInnerClass = symbol.ContainingType != null; | ||||||
| 
 | 
 | ||||||
|             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() |             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() | ||||||
|                                 + "_ScriptSerialization_Generated"; |                                 + "_ScriptSerialization.generated"; | ||||||
| 
 | 
 | ||||||
|             var source = new StringBuilder(); |             var source = new StringBuilder(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -82,7 +82,7 @@ namespace Godot.SourceGenerators | ||||||
|             bool isInnerClass = symbol.ContainingType != null; |             bool isInnerClass = symbol.ContainingType != null; | ||||||
| 
 | 
 | ||||||
|             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() |             string uniqueHint = symbol.FullQualifiedName().SanitizeQualifiedNameForUniqueHint() | ||||||
|                                 + "_ScriptSignals_Generated"; |                                 + "_ScriptSignals.generated"; | ||||||
| 
 | 
 | ||||||
|             var source = new StringBuilder(); |             var source = new StringBuilder(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raul Santos
						Raul Santos