Imagile.Framework.Core 1.0.12

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

Imagile.Framework.Core

Zero-dependency declarative attributes for building opinionated .NET applications. Provides association, metadata, and validation marker attributes for creating type-safe, self-documenting code.

Installation

dotnet add package Imagile.Framework.Core

Features

  • Association Attributes - Declare relationships between enum types

    • [Associated<TEnum>] - Associate enum value with values from another enum
    • [Requires<TEnum>] - Require one or more enum values (all or any semantics)
    • [Includes<TEnum>] - Include related enum values
  • Metadata Attributes - Annotate enum values and properties

    • [Category] - Group enum values by category
    • [Count] - Associate numeric counts with enum values
    • [NativeName] - Map to external system names
    • [Hosted] - Mark enum values as hosted/managed
  • Validation Markers - Control data operations

    • [DoNotUpdate] - Prevent property updates during sync/batch operations

Usage Examples

Association Attributes - Enum Relationships

Create declarative relationships between enum types using [Associated<TEnum>] and [Requires<TEnum>]:

using Imagile.Framework.Core.Attributes;

public enum Permission
{
    Read,
    Write,
    Delete
}

public enum Feature
{
    // Associated: This feature relates to Read permission
    [Associated<Permission>(Permission.Read)]
    ViewDashboard,

    // Associated: This feature relates to Read AND Write permissions
    [Associated<Permission>(Permission.Read, Permission.Write)]
    EditProfile,

    // Requires: This feature needs Read OR Write permission (any)
    [Requires<Permission>(Permission.Read, Permission.Write)]
    ViewReports,

    // Requires: This feature needs BOTH Read AND Write permissions (all)
    [Requires<Permission>(true, Permission.Read, Permission.Write)]
    EditReports
}

Requires vs Associated:

  • [Associated<T>] - Documents relationships (informational)
  • [Requires<T>] - Enforces requirements (validation)
    • Default: Requires ANY of the specified values
    • RequireAll=true: Requires ALL specified values

Metadata Attributes - Categorization and Naming

Organize and annotate enum values with metadata:

public enum ReportType
{
    [Category("Financial")]
    [NativeName("balance_sheet_report")]
    BalanceSheet,

    [Category("Financial")]
    [NativeName("income_statement_report")]
    IncomeStatement,

    [Category("Operational")]
    [Count(12)] // Typical count: 12 monthly reports
    InventoryReport,

    [Category("Operational")]
    [Hosted] // Report is hosted/managed externally
    [NativeName("external_performance_dashboard")]
    PerformanceDashboard
}

Use cases:

  • [Category] - Group related values in UI dropdowns or processing logic
  • [NativeName] - Map to external API names, database values, or legacy system identifiers
  • [Count] - Associate expected counts or limits with enum values
  • [Hosted] - Mark values representing externally hosted/managed resources

Validation Markers - Protecting Properties

Prevent specific properties from being updated during sync or batch operations:

public class Product
{
    public int Id { get; set; }

    public string Name { get; set; } = string.Empty;

    // Set once during creation, never updated
    [DoNotUpdate]
    public DateTime CreatedDate { get; set; }

    // Preserve original value from external system
    [DoNotUpdate]
    public string OriginalSku { get; set; } = string.Empty;

    // This CAN be updated
    public string CurrentSku { get; set; } = string.Empty;
}

Common scenarios:

  • Timestamps set during creation (CreatedDate)
  • Historical state preservation (OriginalSku, InitialPrice)
  • External system identifiers that shouldn't change
  • Computed values managed separately from sync operations

Dependencies

Zero external dependencies - This package has no third-party dependencies and works with .NET 10+ applications.

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or pull request on GitHub.

Repository

https://github.com/imagile/imagile-framework

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.
  • net10.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Imagile.Framework.Core:

Package Downloads
Imagile.Framework.Configuration

Azure configuration abstractions for .NET applications. Includes AppTokenCredential for cloud/local authentication, Key Vault reference replacement, and configuration validation with data annotations.

Imagile.Framework.Blazor.ApplicationInsights

Application Insights telemetry integration for Blazor WebAssembly with automatic page tracking and custom event support.

Imagile.Framework.EntityFrameworkCore

EF Core audit logging with automatic timestamps, user tracking, and property-level change tracking.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.12 37 3/21/2026
1.0.11 35 3/21/2026
1.0.10 31 3/21/2026
1.0.9 31 3/20/2026
1.0.8 125 3/15/2026
1.0.7 117 2/23/2026
1.0.6 132 2/2/2026
1.0.5 183 2/1/2026
1.0.2 122 1/31/2026
1.0.0 128 1/31/2026
0.1.140 125 1/31/2026
0.0.1 132 1/31/2026