Momentum.Extensions.Abstractions 0.0.2

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

Momentum.Extensions.Abstractions

Core abstractions and interfaces for the Momentum platform. This foundational package defines contracts, base types, and abstractions used across all Momentum libraries. Essential for extensibility and loose coupling.

Overview

The Momentum.Extensions.Abstractions package provides the foundational contracts and base types that enable extensibility and loose coupling throughout the Momentum platform. As a dependency-free abstraction layer, it defines interfaces and base classes that other Momentum libraries build upon.

Installation

Add the package to your project using the .NET CLI:

dotnet add package Momentum.Extensions.Abstractions

Or using the Package Manager Console:

Install-Package Momentum.Extensions.Abstractions

Key Features

  • Framework Contracts: Core interfaces that define framework behavior
  • Base Types: Abstract base classes for implementing custom behaviors
  • Dependency-Free: No external dependencies to avoid version conflicts
  • Broad Compatibility: Targets .NET Standard 2.1 for maximum compatibility
  • Extensibility: Designed for loose coupling and testability

Getting Started

Prerequisites

  • .NET Standard 2.1 compatible runtime
  • C# 7.3 or later

Basic Usage

Implementing Core Interfaces
using Momentum.Extensions.Abstractions;

// Example: Implementing a service contract
public class UserService : IUserService
{
    public async Task<User> GetUserAsync(int id)
    {
        // Implementation logic
        return await repository.GetByIdAsync(id);
    }
}
Extending Base Classes
using Momentum.Extensions.Abstractions;

// Example: Custom message handler
public class OrderCreatedHandler : MessageHandlerBase<OrderCreated>
{
    protected override async Task HandleAsync(OrderCreated message, CancellationToken cancellationToken)
    {
        // Custom handling logic
        await ProcessOrderAsync(message.OrderId, cancellationToken);
    }
}
Using Result Types
using Momentum.Extensions.Abstractions;

// Example: Method returning a result
public Result<Customer> ValidateCustomer(CustomerData data)
{
    if (string.IsNullOrEmpty(data.Email))
    {
        return Result<Customer>.Failure("Email is required");
    }

    var customer = new Customer(data.Email, data.Name);
    return Result<Customer>.Success(customer);
}

Architecture

This package sits at the foundation of the Momentum library ecosystem:

Application Code
├── Momentum.Extensions
├── Momentum.ServiceDefaults
├── Momentum.ServiceDefaults.Api
└── Momentum.Extensions.Abstractions ← Foundation

Design Principles

  • Zero Dependencies: No external package references to prevent version conflicts
  • Stable APIs: Contracts designed for long-term stability
  • Performance First: Minimal overhead abstractions
  • Extensibility: Every component supports customization and extension

Target Frameworks

  • .NET Standard 2.1: Compatible with:
    • .NET Core 3.0 and later
    • .NET 5.0 and later
    • .NET Framework 4.8

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

For contribution guidelines and more information about the Momentum platform, visit the main repository.

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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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 (4)

Showing the top 4 NuGet packages that depend on Momentum.Extensions.Abstractions:

Package Downloads
Momentum.Extensions

Core extensions library for Momentum .NET providing common utilities, result types, messaging abstractions, and data access helpers. Includes integrations with Dapper, FluentValidation, OneOf, and WolverineFx.

Momentum.Extensions.XmlDocs

XML documentation utilities for Momentum platform providing parsing, processing, and generation capabilities for XML documentation files. Essential for code analysis and documentation tooling.

Momentum.ServiceDefaults.Api

API-specific service defaults for Momentum platform extending the base ServiceDefaults with gRPC, OpenAPI documentation (Scalar), and API-focused configurations. Essential for Momentum API projects.

Momentum.Extensions.Messaging.Kafka

Kafka messaging integration for Momentum platform providing event-driven communication through Apache Kafka with CloudEvents and WolverineFx support.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2 32 9/9/2025
0.0.2-preview.2 29 9/9/2025
0.0.2-preview.1 118 9/5/2025
0.0.1 264 8/29/2025
0.0.1-preview.1 123 9/4/2025
0.0.1-pre.18 124 9/3/2025
0.0.1-pre.17 114 9/2/2025
0.0.1-pre.16 159 8/29/2025
0.0.1-pre.15 158 8/28/2025
0.0.1-pre.14 346 8/21/2025
0.0.1-pre.13 127 8/21/2025
0.0.1-pre.12 134 8/20/2025
0.0.1-pre.11 117 8/18/2025
0.0.1-pre.10 116 8/18/2025
0.0.1-pre.9 121 8/18/2025
0.0.1-pre.8 111 8/18/2025
0.0.1-pre.7 112 8/18/2025
0.0.1-pre.6 121 8/18/2025
0.0.1-pre.3 168 8/27/2025