add version 0.0.1

This commit is contained in:
2023-03-12 13:31:30 +00:00
parent 433e6a2727
commit b62e34eea2
35 changed files with 1227 additions and 327 deletions

View File

@@ -0,0 +1,18 @@
using ResourceString.Net.Logic.Factories;
using ResourceString.Net.Logic.Parsers.Resx;
var sourceFile = args.First();
var namespaceString = args.Skip(1).FirstOrDefault() ?? "Properties";
var className = args.Skip(2).FirstOrDefault() ?? "Resources";
var result = Parser.TryParse(System.IO.File.ReadAllText(sourceFile)).Match(
Some: v => CodeSnippetFactory.CreateResourceClassCodeSnippet(
namespaceString,
className,
CodeSnippetFactory.CreateResourceMangerMemberCodeSnippet(className),
v.Resources
),
None: () => throw new InvalidOperationException()
);
Console.WriteLine(result.Value.Trim());

View File

@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<PackAsTool>true</PackAsTool>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ResourceString.Net.Logic\ResourceString.Net.Logic.csproj" />
</ItemGroup>
</Project>