BeyondNetCode.Shell.Factory 1.0.0

dotnet add package BeyondNetCode.Shell.Factory --version 1.0.0
                    
NuGet\Install-Package BeyondNetCode.Shell.Factory -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="BeyondNetCode.Shell.Factory" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BeyondNetCode.Shell.Factory" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="BeyondNetCode.Shell.Factory" />
                    
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 BeyondNetCode.Shell.Factory --version 1.0.0
                    
#r "nuget: BeyondNetCode.Shell.Factory, 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.
#:package BeyondNetCode.Shell.Factory@1.0.0
                    
#: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=BeyondNetCode.Shell.Factory&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=BeyondNetCode.Shell.Factory&version=1.0.0
                    
Install as a Cake Tool

<div align="center"> <h1>BeyondNet.Factory</h1> <p><strong>A configuration-driven Factory pattern library for .NET</strong></p>

<p> <a href="README.en.md">🇬🇧 English</a> | <a href="README.es.md">🇪🇸 Español</a> </p>

<p> <a href="https://www.nuget.org/profiles/BeyondNetCode"> <img src="https://img.shields.io/badge/NuGet-BeyondNetCode-blue" alt="NuGet" /> </a> <a href="https://github.com/beyondnetcode/Shell.Factory/actions"> <img src="https://github.com/beyondnetcode/Shell.Factory/workflows/CI%20/%20CD/badge.svg" alt="Build" /> </a> </p> </div>


Welcome to BeyondNet.Factory! A .NET library aimed at improving the factory and abstract factory patterns by introducing configuration-driven behavior.

Installation

NuGet Packages

# Core factory library
dotnet add package BeyondNetCode.Shell.Factory

# Dependency Injection installer
dotnet add package BeyondNetCode.Shell.Factory.Installer

Packages Overview

Package Description NuGet
BeyondNetCode.Shell.Factory Core factory patterns with fluent API link
BeyondNetCode.Shell.Factory.Installer Microsoft.Extensions.DependencyInjection extensions link

Features

  • Configuration-Driven Factory: Create factories with setup records for cleaner instantiation
  • Fluent API: Chain configuration with an expressive builder interface
  • Interceptor Support: Add custom logic before/after object creation
  • DI Integration: Seamless integration with Microsoft.Extensions.DependencyInjection
  • Generic Support: Work with generic types for better type safety
  • Extensible: Easily add custom setup sources and interceptors

Quick Start

Define a Factory Record

public interface IDoSomething
{
    string DoIt(string name);
}

public class DoSomething : IDoSomething
{
    public string DoIt(string name) => $"Hello, {name}!";
}

Configure and Use

// Using fluent API
var factory = new FactorySetupCreateBuilder<IFactory>()
    .Create<DoSomething>()
    .When<Criteria>(c => c.Age > 18)
    .Build();

var service = factory.Create<DoSomething>();
var result = service.DoIt("World"); // "Hello, World!"

Register with DI

services.AddFactory(factory =>
{
    factory.Create<DoSomething>()
        .When<Criteria>(c => c.Age > 18)
        .Create<DoSomethingLessThan18>()
        .When<Criteria>(c => c.Age <= 18);
});

Documentation

For detailed documentation, see the language-specific README files:

Migration from Ums.Shell.Factory

If you were using Ums.Shell.Factory, update your NuGet references:

# Before (Ums.Shell.Factory)
dotnet add package Ums.Shell.Factory

# After (BeyondNetCode.Shell.Factory)
dotnet add package BeyondNetCode.Shell.Factory

Update namespaces in your code:

// Before
using Ums.Shell.Factory;

// After
using BeyondNetCode.Shell.Factory;

Contributing

See CONTRIBUTING.md for GitFlow workflow, commit conventions, and coding standards.

Versioning

See VERSIONING.md for SemVer strategy and release process.

License

Licensed under the MIT License. See LICENSE for details.

Acknowledgments

See DISCLAIMER.md for original code authorship attribution.

Product Compatible and additional computed target framework versions.
.NET 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 BeyondNetCode.Shell.Factory:

Package Downloads
BeyondNetCode.Shell.Factory.Installer

Dependency Injection installer for BeyondNetCode.Shell.Factory

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 129 5/30/2026