FractalDataWorks.Configuration.Abstractions 0.1.0-preview.15

This is a prerelease version of FractalDataWorks.Configuration.Abstractions.
dotnet add package FractalDataWorks.Configuration.Abstractions --version 0.1.0-preview.15
                    
NuGet\Install-Package FractalDataWorks.Configuration.Abstractions -Version 0.1.0-preview.15
                    
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="FractalDataWorks.Configuration.Abstractions" Version="0.1.0-preview.15" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FractalDataWorks.Configuration.Abstractions" Version="0.1.0-preview.15" />
                    
Directory.Packages.props
<PackageReference Include="FractalDataWorks.Configuration.Abstractions" />
                    
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 FractalDataWorks.Configuration.Abstractions --version 0.1.0-preview.15
                    
#r "nuget: FractalDataWorks.Configuration.Abstractions, 0.1.0-preview.15"
                    
#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 FractalDataWorks.Configuration.Abstractions@0.1.0-preview.15
                    
#: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=FractalDataWorks.Configuration.Abstractions&version=0.1.0-preview.15&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FractalDataWorks.Configuration.Abstractions&version=0.1.0-preview.15&prerelease
                    
Install as a Cake Tool

FractalDataWorks.Configuration.Abstractions

Abstractions for configuration options loading patterns and configuration metadata.

Overview

This package provides interfaces and base classes for:

  • Unified access to Microsoft.Extensions.Options interfaces (IOptions, IOptionsSnapshot, IOptionsMonitor)
  • TypeCollection pattern for options loader type discovery
  • Attributes for UI-driven configuration metadata

Key Types

Options Loading

From IConfigurationOptionsLoader.cs:33-70:

public interface IConfigurationOptionsLoader<out TOptions>
    where TOptions : class
{
    /// <summary>
    /// Gets the current configuration value.
    /// </summary>
    TOptions CurrentValue { get; }

    /// <summary>
    /// Gets a value indicating whether this loader supports change notifications.
    /// </summary>
    bool SupportsChangeNotification { get; }

    /// <summary>
    /// Registers a listener to be called when the configuration changes.
    /// </summary>
    IDisposable? OnChange(Action<TOptions, string?> listener);
}

From IOptionsLoader.cs:24-63:

public interface IOptionsLoader : ITypeOption<int, OptionsLoaderBase>
{
    string OptionsInterfaceName { get; }
    bool SupportsHotReload { get; }
    string CurrentValueAccessor { get; }
    bool RequiresDisposable { get; }
    IConfigurationOptionsLoader<TOptions> CreateLoader<TOptions>(IServiceProvider serviceProvider)
        where TOptions : class;
}

From OptionsLoaderBase.cs:19-78:

public abstract class OptionsLoaderBase : TypeOptionBase<int, OptionsLoaderBase>, IOptionsLoader
{
    public abstract string OptionsInterfaceName { get; }
    public abstract bool SupportsHotReload { get; }
    public abstract string CurrentValueAccessor { get; }
    public abstract bool RequiresDisposable { get; }

    public virtual IConfigurationOptionsLoader<TOptions> CreateLoader<TOptions>(IServiceProvider serviceProvider)
        where TOptions : class
    {
        throw new InvalidOperationException(
            $"Cannot create loader from Empty options loader type. Use a concrete implementation: Singleton, Scoped, or Reloadable.");
    }

    protected OptionsLoaderBase(int id, string name) : base(id, name)
    {
    }
}

Configuration Attributes

From Attributes/ConfigurationPropertyAttribute.cs:40-118:

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public sealed class ConfigurationPropertyAttribute : Attribute
{
    public string? Label { get; set; }
    public string? HelpText { get; set; }
    public string? Placeholder { get; set; }
    public int Order { get; set; } = int.MaxValue;
    public bool IsHidden { get; set; }
    public bool IsReadOnly { get; set; }
    public int MaxLength { get; set; } = 255;
    public string? ColumnName { get; set; }
    public string Section { get; set; } = "General";
    public int Width { get; set; } = 6;
}

From Attributes/ConfigurationSectionAttribute.cs:37-92:

[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class ConfigurationSectionAttribute : Attribute
{
    public ConfigurationSectionAttribute(string name)
    {
        Name = name ?? throw new ArgumentNullException(nameof(name));
    }

    public string Name { get; }
    public string? Title { get; set; }
    public string? Description { get; set; }
    public int Order { get; set; } = int.MaxValue;
    public bool IsCollapsible { get; set; }
    public bool IsExpanded { get; set; } = true;
}

Usage

Options loaders are accessed via the OptionsLoaderTypes TypeCollection in the FractalDataWorks.Configuration package.

From OptionsLoaderIntegrationTests.cs:17-26:

// Arrange & Act
var loader = OptionsLoaderTypes.Singleton;

// Assert
loader.OptionsInterfaceName.ShouldBe("IOptions");
loader.CurrentValueAccessor.ShouldBe(".Value");
loader.RequiresDisposable.ShouldBeFalse();

From OptionsLoaderIntegrationTests.cs:40-50:

// Arrange & Act
var loader = OptionsLoaderTypes.Reloadable;

// Assert
loader.OptionsInterfaceName.ShouldBe("IOptionsMonitor");
loader.CurrentValueAccessor.ShouldBe(".CurrentValue");
loader.RequiresDisposable.ShouldBeTrue();

Loader Types

Loader Options Interface Hot Reload Change Notifications Use Case
Singleton IOptions No No Static configuration
Scoped IOptionsSnapshot No No Per-request/per-tenant
Reloadable IOptionsMonitor Yes Yes Database-backed config

Installation

<PackageReference Include="FractalDataWorks.Configuration.Abstractions" />

Dependencies

  • FractalDataWorks.Collections - TypeCollection base classes

Best Practices

  1. Use Singleton loader for static configuration that never changes at runtime
  2. Use Scoped loader for multi-tenant scenarios where configuration varies per request
  3. Use Reloadable loader for database-backed configuration that supports hot reload
  4. Implement IDisposable when using Reloadable loader to clean up change notification subscriptions
  5. Use ConfigurationPropertyAttribute to customize UI rendering of configuration properties
  6. Group related properties using ConfigurationSectionAttribute on the configuration class
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (30)

Showing the top 5 NuGet packages that depend on FractalDataWorks.Configuration.Abstractions:

Package Downloads
FractalDataWorks.Configuration

Development tools and utilities for the FractalDataWorks ecosystem. Build:

FractalDataWorks.DependencyInjection

Development tools and utilities for the FractalDataWorks ecosystem. Build:

FractalDataWorks.ServiceTypes

Development tools and utilities for the FractalDataWorks ecosystem. Build:

FractalDataWorks.Services.Scheduling.Abstractions

Development tools and utilities for the FractalDataWorks ecosystem. Build:

FractalDataWorks.Services.Transformations.Abstractions

Development tools and utilities for the FractalDataWorks ecosystem. Build:

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.15 0 1/15/2026
0.1.0-preview.11 85 1/12/2026
0.1.0-preview.10 90 1/12/2026
0.1.0-preview.9 120 1/9/2026
0.1.0-preview.7 141 1/7/2026