RXml.Generator 1.0.0

dotnet add package RXml.Generator --version 1.0.0                
NuGet\Install-Package RXml.Generator -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RXml.Generator" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RXml.Generator --version 1.0.0                
#r "nuget: RXml.Generator, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RXml.Generator as a Cake Addin
#addin nuget:?package=RXml.Generator&version=1.0.0

// Install RXml.Generator as a Cake Tool
#tool nuget:?package=RXml.Generator&version=1.0.0                

RXml Resources for .Net

Generate constants classes to avoid use of magic strings with resources.

Can be used as follows:

XResIndex.Title

To overcome the fact that WebAssembly does not have access to the solution's Resx files.

Usage

  • Install the package [^1]

      Install-Package RXml.Generator
    
  • Define .rxml files

    Example: Index.xres

      <?xml  version="1.0"  encoding="utf-8" ?>
      <Resources>
      	<Res  Key="Title">
      		<Value  lang="fr">Indexe</Value>
      		<Value  lang="en">Index</Value>
      	</Res>
      	<Res  Key="HelloWorld">
      		<Value  lang="fr">Bonjour monde !</Value>
      		<Value  lang="en">Hello, world!</Value> 
      	</Res>
      	<Res  Key="Bienvenue">
      		<Value  lang="fr">Bienvenue dans votre application.</Value>
      		<Value  lang="en">Welcome to your new app.</Value> 
      	</Res>
      	<Res  Key="Survey">
      		<Value  lang="fr">Comment Blazor fonctionne pour vous ?</Value>
      		<Value  lang="en">How is Blazor working for you?</Value>
      	</Res> 
      </Resources>
    
  • In the csproj define rxml like this [^2]

      <ItemGroup>
      	<AdditionalFiles  Include="<ResourcesPath>\*.rxml" />
      </ItemGroup>
    

    AdditionalFiles - For the Code generator to produce constants classes

[^1]: To use with RXml.Abstraction the package allows to avoid using magic string for resource usage. [^2]: The definition here is only for the RXml.Generator, to use with RXml.Abstraction see documentation of the package

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 113 7/15/2024

Initial release