Codefactors.DataFabric 1.0.48

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

Codefactors.DataFabric

Data synchronisation layer for C# and TypeScript

Codefactors.DataFabric is a library that provides a simple and efficient way to subscribe to data changes in a database. It is designed to be used in a microservices architecture where services need to be notified of changes in a database.

SignalR Transport

using Microsoft.AspNetCore.SignalR;
using Codefactors.DataFabric.Subscriptions;
using Codefactors.DataFabric.Transport;
using Codefactors.DataFabric.Transport.SignalR;

namespace Codefactors.DataFabric.WebApi.Transport;

public class SignalRHelper(Uri hubPath) : ITransportHelper
{
    private readonly Uri _hubPath = hubPath;

    public void Initialise(IServiceCollection services)
    {
        services.AddSingleton<IUserIdProvider, SignalRUserIdProvider>();

        services.AddSignalR();

        services.AddSingleton<IDataFabricTransport, SignalRTransport>();
        services.AddSingleton<ISubscriptionFactory, SignalRSubscriptionFactory>();
    }

    public void InitialiseMiddleware(object app)
    {
        if (app is WebApplication application)
        {
            application.UseMiddleware<SignalRAuthenticationMiddleware>(_hubPath.ToString());
        }
        else
        {
            throw new ArgumentException("Unable to initialise transport middleware; invalid application type");
        }
    }

    public void Start(object app)
    {
        if (app is WebApplication application)
        {
            application.MapHub<NotificationHub>(_hubPath.ToString())
                .RequireAuthorization();
        }
        else
        {
            throw new ArgumentException("Unable to start transport; invalid application type");
        }
    }
}


License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 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 (1)

Showing the top 1 NuGet packages that depend on Codefactors.DataFabric:

Package Downloads
Codefactors.DataFabric.Transport.SignalR

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.48 124 11/4/2024
1.0.47 115 11/4/2024
1.0.46 106 11/4/2024
1.0.45 110 10/28/2024
1.0.44 112 10/24/2024
1.0.43 113 10/24/2024
1.0.42 111 10/24/2024
1.0.41 117 10/15/2024
1.0.37 108 10/15/2024
1.0.33 147 9/12/2024
1.0.30 140 9/9/2024
1.0.29 141 9/9/2024
1.0.28 143 9/9/2024
1.0.27 150 9/9/2024
1.0.26 145 9/9/2024
1.0.25 136 9/9/2024
1.0.24 144 9/9/2024
1.0.23 144 9/6/2024
1.0.22 141 9/6/2024
1.0.21 141 9/4/2024
1.0.20 155 8/23/2024
1.0.19 134 8/20/2024
1.0.16 148 8/14/2024
1.0.15 148 8/13/2024
1.0.14 147 8/12/2024
1.0.13 180 8/11/2024
1.0.12 140 8/10/2024
1.0.11 138 8/10/2024
1.0.6 131 8/8/2024
1.0.5 146 8/8/2024
1.0.4 158 8/8/2024