Phymnary.SugarPot.Module 1.0.2

dotnet add package Phymnary.SugarPot.Module --version 1.0.2
                    
NuGet\Install-Package Phymnary.SugarPot.Module -Version 1.0.2
                    
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="Phymnary.SugarPot.Module" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Phymnary.SugarPot.Module" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Phymnary.SugarPot.Module" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Phymnary.SugarPot.Module --version 1.0.2
                    
#r "nuget: Phymnary.SugarPot.Module, 1.0.2"
                    
#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.
#:package Phymnary.SugarPot.Module@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Phymnary.SugarPot.Module&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Phymnary.SugarPot.Module&version=1.0.2
                    
Install as a Cake Tool

Phymnary.SugarPot.Module

Lightweight module helpers for .NET applications.

This project provides a small module pattern to organize service registration and configuration binding in a consistent way.

Features

  • IModule contract for module-based service registration
  • AddModule<TModule>() extension for IHostApplicationBuilder
  • Optional integration with IAutoRegister from Phymnary.SugarPot.DependencyInjection
  • IAppSettingsSection pattern for strongly-typed configuration sections
  • ConfigureSection<TConfig>() helpers for binding and validating options
  • Utility extension methods for strings, enums, collections, reflection attributes, and enumerables

Installation

Install Phymnary.SugarPot.Module from NuGet Package Manager.

Quick Start

1) Create a module

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Phymnary.SugarPot.Module;

public sealed class UserModule : IModule
{
    public void ConfigureServices(IServiceCollection services, IConfigurationManager configuration)
    {
        services.AddOptions();
    }
}

2) Register the module

using Phymnary.SugarPot.Module.Extensions;

var builder = Host.CreateApplicationBuilder(args);
builder.AddModule<UserModule>();

Configuration Section Binding

Define config model

using Phymnary.SugarPot.Module;

public sealed class JwtOptions : IAppSettingsSection
{
    public static string Section => "Jwt";

    public string Issuer { get; set; } = string.Empty;
    public string Audience { get; set; } = string.Empty;
}

Bind section

using Phymnary.SugarPot.Module.Extensions;

services.ConfigureSection<JwtOptions>();

Bind section with validator

services.ConfigureSection<JwtOptions, JwtOptionsValidator>();

Extension Method Highlights

  • PascalToKebabCase()
  • SplitBySemicolon()
  • IsBlank(), TryGetValuable(), IsTruthy()
  • TryGetExplicit() for enums
  • AddIfNotExisted()
  • AppendIfNotNull(), WhereNotNull(), JoinAsString()
  • HasAttribute<TAttribute>()

Target Frameworks

  • .NET Standard 2.1
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Phymnary.SugarPot.Module:

Package Downloads
Phymnary.SugarPot.AspNetCore.Domain

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 473 6/15/2026
1.0.0 587 6/5/2026