Skip to content

Commit

Permalink
build: corrected build script perms
Browse files Browse the repository at this point in the history
  • Loading branch information
payetools committed Sep 11, 2024
1 parent c33d965 commit 5fe0d21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 50 deletions.
56 changes: 6 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -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<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");
}
}
## Subhead
```csharp

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");
}
}
}
```

### Acknowledgements

```

### License
This project is licensed under the MIT License.
Empty file modified build.cmd
100644 → 100755
Empty file.
Empty file modified build.sh
100644 → 100755
Empty file.

0 comments on commit 5fe0d21

Please sign in to comment.