mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	- Added NadekoBot.Generators projects which will contain source generators
- Implemented initial version of the response strings source generator - Creates a class with property names equivalent to key names in responses.en-US.json - Each Property has struct type (with generic type parameters matching the number of string format placeholders) for type safe GetText implementation - Struct types are readonly refs as they should be ephermal, and only used to pass string keys to GetText
This commit is contained in:
		
							
								
								
									
										23
									
								
								src/NadekoBot.Generators/NadekoBot.Generators.csproj
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/NadekoBot.Generators/NadekoBot.Generators.csproj
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
<Project Sdk="Microsoft.NET.Sdk">
 | 
			
		||||
 | 
			
		||||
    <PropertyGroup>
 | 
			
		||||
        <TargetFramework>netstandard2.0</TargetFramework>
 | 
			
		||||
        <IncludeBuildOutput>false</IncludeBuildOutput>
 | 
			
		||||
    </PropertyGroup>
 | 
			
		||||
    
 | 
			
		||||
    <ItemGroup>
 | 
			
		||||
        <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" PrivateAssets="all" />
 | 
			
		||||
        <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
 | 
			
		||||
        <PackageReference Include="Newtonsoft.Json" Version="13.0.1" PrivateAssets="all" GeneratePathProperty="true" />
 | 
			
		||||
    </ItemGroup>
 | 
			
		||||
    
 | 
			
		||||
    <PropertyGroup>
 | 
			
		||||
        <GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
 | 
			
		||||
    </PropertyGroup>
 | 
			
		||||
 | 
			
		||||
    <Target Name="GetDependencyTargetPaths">
 | 
			
		||||
        <ItemGroup>
 | 
			
		||||
            <TargetPathWithTargetPlatformMoniker Include="$(PKGNewtonsoft_Json)\lib\netstandard2.0\Newtonsoft.Json.dll" IncludeRuntimeDependency="false" />
 | 
			
		||||
        </ItemGroup>
 | 
			
		||||
    </Target>
 | 
			
		||||
</Project>
 | 
			
		||||
		Reference in New Issue
	
	Block a user