AutoPatch.Server 9.1.1

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

🩹 AutoPatch Framework

NuGet Server NuGet Client Build Status License: MIT

Real-time object synchronization between server and client using SignalR and JsonPatch

AutoPatch Framework enables automatic, transparent real-time synchronization of objects between server and client. Once configured, objects are kept in sync automatically without additional code - just subscribe and watch your objects update in real-time.

✨ Features

  • 🔄 Automatic Real-time Sync - Objects stay synchronized without manual intervention
  • 🚀 Performance Optimized - Intelligent throttling and batching system
  • 📱 UI Integration - Seamless data binding via INotifyPropertyChanged
  • 🛡️ Type Safety - Strongly typed API with compile-time validation
  • 🎯 Minimal API - Just Subscribe/Unsubscribe - everything else is automatic
  • 📦 JsonPatch Based - Efficient delta updates, only changes are transmitted
  • 🔌 SignalR Powered - Built on proven real-time communication infrastructure
  • 🔑 Multiple Collections - Support for multiple keyed collections of the same type
  • 🔐 Subscription Validation - Per-collection authentication and authorization control

🎯 Use Cases

Live Dashboards • Real-time Tracking • Status Monitoring • Live Feeds • IoT Applications • Multi-tenant Systems

🚀 Quick Start

Installation

dotnet add package AutoPatch.Server  # Server
dotnet add package AutoPatch.Client  # Client

Server Setup

// Program.cs
var builder = WebApplication.CreateBuilder(args);

builder.Services
    .AddAutoPatch(cfg => cfg.DefaultThrottleInterval = TimeSpan.FromMilliseconds(500))
    .AddTrackedCollection<Order>()
    .AddSignalR();

var app = builder.Build();
app.UseAutoPatch();
app.Run();

// Use tracked collections
public class OrderService
{
    private readonly ObservableCollection<Order> _orders;

    public OrderService(ITrackedCollectionManager manager)
    {
        _orders = manager.GetOrCreateCollection<Order>();
    }

    public void ProcessOrder(Order order)
    {
        _orders.Add(order);              // → Auto-sync to clients
        order.Status = "Processing";     // → Auto-sync property changes
    }
}

Client Setup

// App setup
services.AddAutoPatch(cfg => cfg.Endpoint = "http://localhost:5249")
        .AddTrackedCollection<Order>();

// Usage
public class OrderViewModel
{
    public ObservableCollection<Order> Orders { get; private set; } = [];

    public async Task InitializeAsync()
    {
        await _client.SubscribeToTypeAsync<Order>();
        Orders = _client.GetTrackedCollection<Order>(); // Auto-updating collection
    }
}

📖 Advanced Features

Multiple Collections & Authentication

// Server: Collection per tenant
var tenantOrders = manager.GetOrCreateCollection<Order>($"tenant_{tenantId}");

// Client: Subscribe with auth
await client.SubscribeToTypeAsync<Order>("tenant_123", "auth_token");
var orders = client.GetTrackedCollection<Order>("tenant_123");

// Validator
public class OrderValidator : ICollectionSubscriptionValidator<Order>
{
    public bool ValidateSubscription(string? auth, string key) => auth == "valid_token";
}
builder.Services.AddTrackedCollection<Order, OrderValidator>();

Configuration Options

builder.Services.AddTrackedCollection<Order>(cfg =>
{
    cfg.ThrottleInterval = TimeSpan.FromMilliseconds(100);  // Update frequency
    cfg.ExcludedProperties = ["InternalData"];              // Skip properties
    cfg.ClientChangePolicy = ClientChangePolicy.Reject;    // Read-only
});

🏗️ How It Works

Server: ObservableCollection<T> changes → JsonPatch → SignalR broadcast
Client: Receive patches → Apply to local ObservableCollection<T> → UI updates

🌟 Roadmap

  • Bidirectional Sync - Client-to-server change propagation
  • Change Policies - Auto/RequireConfirmation/Reject modes
  • Filtering - Subscription filters and conditional updates
  • Offline Support - Sync on reconnect

🆘 Support & Community

Got questions? We're here to help!

🐛 Report Issues - Found a bug or have a feature request?
💬 Join Discussions - Ask questions, share ideas, or showcase your projects
📧 Direct Contact - Need enterprise support or consulting?
Star the Project - Show your support and stay updated!


Made with ❤️ for real-time applications

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
9.1.1 72 9/12/2025
9.0.7 127 9/8/2025
9.0.6 124 9/8/2025
9.0.3 201 8/24/2025
9.0.2 197 8/24/2025
9.0.1 195 8/24/2025