AtomUI.Foundation.Generator 1.0.0

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

AtomUI.Foundation

License: LGPL-3.0

Documentation Language: English | 简体中文

Overview

AtomUI.Foundation is the foundational infrastructure repository for the AtomUI ecosystem. It provides shared runtime primitives and source-generation support that other AtomUI packages can build on without depending on a specific control library.

The first release focuses on modularity:

  • AtomUI.Foundation contains module identifiers, module descriptors, dependency graph resolution, lifecycle hosting and module service registration primitives.
  • AtomUI.Foundation.Generator contains Roslyn source generators and diagnostics for module catalog generation.

Packages

Package Description
AtomUI.Foundation Runtime infrastructure package for shared AtomUI foundation APIs.
AtomUI.Foundation.Generator Analyzer/source-generator package for generated AtomUI infrastructure.

Current prerelease version:

dotnet add package AtomUI.Foundation --version 1.0.0-alpha.1

If your project needs generated module catalogs, reference the generator as an analyzer:

<PackageReference Include="AtomUI.Foundation.Generator" Version="1.0.0-alpha.1" PrivateAssets="all" />

Modularity

Mark module classes with ModuleAttribute and derive from ModuleBase:

using AtomUI.Modularity;

[Module(DisplayName = "Core")]
public sealed partial class CoreModule : ModuleBase
{
}

[Module(DisplayName = "Selection", Dependencies = [typeof(CoreModule)])]
public sealed partial class SelectionModule : ModuleBase
{
}

The module catalog generator emits an internal ModuleGeneratedCatalog type with a CreateRegistrations() method:

using AtomUI.Modularity;

var registrations = ModuleGeneratedCatalog.CreateRegistrations();
var host = new ModuleHost(registrations);
var result = await host.InitializeAsync();

Generated catalog naming can be customized with MSBuild properties:

<PropertyGroup>
    <AtomUIModularityCatalogNamespace>MyApp.Generated</AtomUIModularityCatalogNamespace>
    <AtomUIModularityCatalogTypeName>MyModuleCatalog</AtomUIModularityCatalogTypeName>
</PropertyGroup>

Local Development

Build the full solution:

dotnet build AtomUI.Foundation.slnx

Run runtime tests:

dotnet test tests/AtomUI.Foundation.Tests/AtomUI.Foundation.Tests.csproj --framework net10.0

Run generator tests:

dotnet test tests/AtomUI.Foundation.Generator.Tests/AtomUI.Foundation.Generator.Tests.csproj --framework net10.0

Publish packages to a local NuGet source:

pwsh -File scripts/PublishToLocalSources.ps1
pwsh -File scripts/PublishToLocalSources.ps1 -localSourcesDir /path/to/nuget.local -buildType Release

Repository Layout

Path Purpose
src/AtomUI.Foundation Runtime package source.
src/AtomUI.Foundation.Generator Roslyn generator package source.
tests/AtomUI.Foundation.Tests Runtime tests.
tests/AtomUI.Foundation.Generator.Tests Generator tests.
build/ Centralized MSBuild versioning, package metadata and output configuration.
docs/ Architecture and engineering documentation.
scripts/ Local development and publishing scripts.

License

AtomUI.Foundation uses the same license as AtomUI: GNU Lesser General Public License v3.0. See LICENSE.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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 388 8/9/2026