ThisAssembly.Strings 1.4.2

This package generates a static ThisAssembly.Strings class with public constants exposing string resources in .resx files or methods with the right number of parameters for strings that use formatting parameters.

In addition, it groups constants and methods in nested classes according to an optional underscore separator to organize strings. For example, User_InvalidCredentials can be accessed with ThisAssembly.Strings.User.InvalidCredentials if it contains a simple string, or as a method with the right number of parametres if its value has a format string.

Given the following Resx file:

Name Value Comment
Infrastructure_MissingService Service {0} is required. For logging only!
Shopping_NoShipping We cannot ship {0} to {1}.
Shopping_OutOfStock Product is out of stock at this time.

The following code would be generated:

partial class ThisAssembly
{
    public static partial class Strings
    {
        public static partial class Infrastructure
        {
            /// <summary>
            /// For logging only!
            /// => "Service {0} is required."
            /// </summary>
            public static string MissingService(object arg0)
                => string.Format(CultureInfo.CurrentCulture, 
                    Strings.GetResourceManager("ThisStore.Properties.Resources").GetString("MissingService"), 
                    arg0);
        }

        public static partial class Shopping
        {
            /// <summary>
            /// => "We cannot ship {0} to {1}."
            /// </summary>
            public static string NoShipping(object arg0, object arg1)
                => string.Format(CultureInfo.CurrentCulture, 
                    Strings.GetResourceManager("ThisStore.Properties.Resources").GetString("NoShipping"), 
                    arg0, arg1);

            /// <summary>
            /// => "Product is out of stock at this time."
            /// </summary>
            public static string OutOfStock
                => Strings.GetResourceManager("ThisStore.Properties.Resources").GetString("OutOfStock");
        }
    }
}

Sponsors

Clarius Org Kirill Osenkov MFB Technologies, Inc. Stephen Shaw Torutek DRIVE.NET, Inc. Daniel Gnägi Ashley Medway Keith Pickford Thomas Bolon Kori Francis Toni Wenzel Giorgi Dalakishvili Mike James Dan Siegel Reuben Swartz Jacob Foshee Eric Johnson Norman Mackay Certify The Web Ix Technologies B.V. David JENNI Jonathan Oleg Kyrylchuk Charley Wu Jakob Tikjøb Andersen Seann Alexander Tino Hager Mark Seemann Angelo Belchior Ken Bonny Simon Cropp agileworks-eu Zheyu Shen Vezel

Sponsor this project  

Learn more about GitHub Sponsors

Showing the top 20 packages that depend on ThisAssembly.Strings.

Packages Downloads
ThisAssembly
Meta-package that includes all ThisAssembly.* packages.
4
ThisAssembly
Meta-package that includes all ThisAssembly.* packages. > This project uses SponsorLink to attribute sponsor status (direct, indirect or implicit). For IDE usage, sponsor status is required. > IDE-only warnings will be emitted after a grace period otherwise. Learn more at https://github.com/devlooped#sponsorlink.
3
ThisAssembly
Meta-package that includes all ThisAssembly.* packages.
2
ThisAssembly
Meta-package that includes all ThisAssembly.* packages. ** C# 9.0 ONLY **
2
ThisAssembly
Meta-package that includes all ThisAssembly.* packages. > This project uses SponsorLink to attribute sponsor status (direct, indirect or implicit). For IDE usage, sponsor status is required. > IDE-only warnings will be emitted after a grace period otherwise. Learn more at https://github.com/devlooped#sponsorlink.
2
ThisAssembly
Meta-package that includes all ThisAssembly.* packages. ** C# 9.0 ONLY ** Built from https://github.com/devlooped/ThisAssembly/tree/832f99169
2

.NET Standard 2.0

Version Downloads Last updated
2.1.2 2 06/16/2026
2.1.1 2 06/16/2026
2.1.0 2 06/16/2026
2.1.0-rc.1 2 06/16/2026
2.1.0-rc 2 06/16/2026
2.1.0-beta 2 06/16/2026
2.0.14 3 06/16/2026
2.0.13 3 06/16/2026
2.0.12 3 06/16/2026
2.0.11 3 06/16/2026
2.0.10 3 06/16/2026
2.0.9 2 06/16/2026
2.0.8 2 06/16/2026
2.0.7 2 06/15/2026
2.0.6 2 06/16/2026
2.0.5 3 06/16/2026
2.0.4 3 06/16/2026
2.0.3 3 06/16/2026
2.0.2 3 06/16/2026
1.4.3 3 06/16/2026
1.4.2 3 06/16/2026
1.4.1 3 06/16/2026
1.4.0 3 06/16/2026
1.1.3 3 06/16/2026
1.1.2 3 06/16/2026
1.1.1 3 06/16/2026
1.1.1-beta 3 06/16/2026
1.1.0 3 06/16/2026
1.0.10 3 06/16/2026
1.0.9 3 06/16/2026
1.0.8 2 06/16/2026
1.0.7 3 06/16/2026
1.0.6 3 06/16/2026
1.0.5 3 06/16/2026
1.0.4 3 06/16/2026
1.0.3 3 06/16/2026
1.0.2 3 06/16/2026
1.0.1 3 06/16/2026
1.0.0 3 06/16/2026
1.0.0-rc.1 3 06/16/2026
1.0.0-rc 3 06/16/2026
1.0.0-beta 3 06/16/2026
1.0.0-alpha.3 3 06/16/2026
1.0.0-alpha.2 3 06/16/2026
1.0.0-alpha.1 3 06/16/2026
1.0.0-alpha 3 06/16/2026
0.10.6 3 06/16/2026
0.10.5 3 06/16/2026