diff --git a/README.md b/README.md index 9363099..a2916af 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,15 @@ -# Codefactors.DataFabric -## Data synchronisation layer for C# and TypeScript +# StandardWebhooks -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. +## Implementation of Standard Webhooks for .NET Core -## SignalR Transport -```csharp -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(); - - services.AddSignalR(); - services.AddSingleton(); - services.AddSingleton(); - } - - public void InitialiseMiddleware(object app) - { - if (app is WebApplication application) - { - application.UseMiddleware(_hubPath.ToString()); - } - else - { - throw new ArgumentException("Unable to initialise transport middleware; invalid application type"); - } - } +## Subhead +```csharp - public void Start(object app) - { - if (app is WebApplication application) - { - application.MapHub(_hubPath.ToString()) - .RequireAuthorization(); - } - else - { - throw new ArgumentException("Unable to start transport; invalid application type"); - } - } -} +``` +### Acknowledgements -``` ### License This project is licensed under the MIT License. diff --git a/build.cmd b/build.cmd old mode 100644 new mode 100755 diff --git a/build.sh b/build.sh old mode 100644 new mode 100755