add version 0.0.1
This commit is contained in:
23
example/Example.App/Example.App.csproj
Normal file
23
example/Example.App/Example.App.csproj
Normal file
@@ -0,0 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\ResourceString.Net\ResourceString.Net.csproj" OutputItemType="Analyzer" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<AdditionalFileItemNames>$(AdditionalFileItemNames);EmbeddedResource</AdditionalFileItemNames>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
22
example/Example.App/Program.cs
Normal file
22
example/Example.App/Program.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace Test
|
||||
{
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello");
|
||||
|
||||
var foo = Example.App.Resources.Test1;
|
||||
Console.WriteLine(foo.Value);
|
||||
|
||||
var bar = Example.App.Properties.SubProperties.Properties.Test2.From(
|
||||
ResourceString.Net.Contract.LiteralString.Factory("1"),
|
||||
ResourceString.Net.Contract.LiteralString.Factory("2")
|
||||
);
|
||||
|
||||
Console.WriteLine(bar.Value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
14
example/Example.App/Properties/SubProperties/Properties.resx
Normal file
14
example/Example.App/Properties/SubProperties/Properties.resx
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<root>
|
||||
<data name='Test1'>
|
||||
<value>Value1</value>
|
||||
<comment>This is a greeting message.</comment>
|
||||
</data>
|
||||
<data name='Test2' type='System.String'>
|
||||
<value>{1}Value2{0}{{2}}</value>
|
||||
<comment>2 = prefix</comment>
|
||||
</data>
|
||||
<data name='Test3' type='System.Byte[]'>
|
||||
<value>0xDEADBEEF</value>
|
||||
</data>
|
||||
</root>
|
||||
14
example/Example.App/Resources.resx
Normal file
14
example/Example.App/Resources.resx
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<root>
|
||||
<data name='Test1'>
|
||||
<value>Value1</value>
|
||||
<comment>This is a greeting message.</comment>
|
||||
</data>
|
||||
<data name='Test2' type='System.String'>
|
||||
<value>{1}Value2{0}{{2}}</value>
|
||||
<comment>2 = prefix</comment>
|
||||
</data>
|
||||
<data name='Test3' type='System.Byte[]'>
|
||||
<value>0xDEADBEEF</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user