add version 0.0.1
This commit is contained in:
18
ResourceString.Net.App.Console/Program.cs
Normal file
18
ResourceString.Net.App.Console/Program.cs
Normal 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());
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user