AutoPatch.Server
9.1.1
dotnet add package AutoPatch.Server --version 9.1.1
NuGet\Install-Package AutoPatch.Server -Version 9.1.1
<PackageReference Include="AutoPatch.Server" Version="9.1.1" />
<PackageVersion Include="AutoPatch.Server" Version="9.1.1" />
<PackageReference Include="AutoPatch.Server" />
paket add AutoPatch.Server --version 9.1.1
#r "nuget: AutoPatch.Server, 9.1.1"
#:package AutoPatch.Server@9.1.1
#addin nuget:?package=AutoPatch.Server&version=9.1.1
#tool nuget:?package=AutoPatch.Server&version=9.1.1
🩹 AutoPatch Framework
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 | Versions 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. |
-
net9.0
- AutoPatch.Core (>= 9.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.