Cocoar.SignalARRR.SourceGenerator
4.2.0
See the version list below for details.
dotnet add package Cocoar.SignalARRR.SourceGenerator --version 4.2.0
NuGet\Install-Package Cocoar.SignalARRR.SourceGenerator -Version 4.2.0
<PackageReference Include="Cocoar.SignalARRR.SourceGenerator" Version="4.2.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Cocoar.SignalARRR.SourceGenerator" Version="4.2.0" />
<PackageReference Include="Cocoar.SignalARRR.SourceGenerator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Cocoar.SignalARRR.SourceGenerator --version 4.2.0
#r "nuget: Cocoar.SignalARRR.SourceGenerator, 4.2.0"
#:package Cocoar.SignalARRR.SourceGenerator@4.2.0
#addin nuget:?package=Cocoar.SignalARRR.SourceGenerator&version=4.2.0
#tool nuget:?package=Cocoar.SignalARRR.SourceGenerator&version=4.2.0
SignalARRR
Typed bidirectional RPC over ASP.NET Core SignalR.
Server and client call each other's methods through shared interfaces — with compile-time proxy generation, streaming, cancellation propagation, and ASP.NET Core authorization. Clients available for .NET, TypeScript/JavaScript, and Swift.
Packages
.NET
| Package | Purpose |
|---|---|
Cocoar.SignalARRR.Contracts |
[SignalARRRContract] attribute + source generator — reference from shared interface projects |
Cocoar.SignalARRR.Server |
Server-side: HARRR hub, ServerMethods, authorization, ClientManager |
Cocoar.SignalARRR.Client |
Client-side: HARRRConnection, typed proxies, event handlers |
Cocoar.SignalARRR.DynamicProxy |
Opt-in runtime proxy fallback via DispatchProxy |
Cocoar.SignalARRR.Client.FullFramework |
Client for .NET Framework 4.6.2+ — typed proxies, streaming, file transfer |
TypeScript / JavaScript
npm install @cocoar/signalarrr
Swift (iOS / macOS)
.package(url: "https://github.com/cocoar-dev/Cocoar.SignalARRR.git", from: "4.0.0")
Quick Start
Define shared interfaces, set up the server, and call methods with full type safety:
// Shared interface
[SignalARRRContract]
public interface IChatHub {
Task SendMessage(string user, string message);
Task<List<string>> GetHistory();
}
// Client usage — one line to get a typed proxy
var chat = connection.GetTypedMethods<IChatHub>();
await chat.SendMessage("Alice", "Hello!");
// TypeScript client
const history = await connection.invoke<string[]>('ChatMethods.GetHistory');
// Swift client — @HubProxy macro generates the proxy
@HubProxy protocol IChatHub { ... }
let chat = connection.getTypedMethods(IChatHubProxy.self)
For full setup guides, streaming, authorization, and server-to-client calls, see the documentation.
Features
- Typed bidirectional RPC — server and client call each other through shared interfaces
- Compile-time proxy generation — Roslyn source generator (zero reflection)
- Organized hub methods — split logic across
ServerMethods<T>classes with full DI - Streaming —
IAsyncEnumerable<T>,IObservable<T>,ChannelReader<T>in both directions - HTTP stream references — file download/upload through SignalR hub methods
- CancellationToken propagation — server can cancel client operations remotely
- Authorization — method-level, class-level, and hub-level
[Authorize] - Server-to-client calls from anywhere — inject
ClientManagerin controllers, background services, etc. - Four clients — .NET, .NET Framework, TypeScript/JavaScript, Swift
- Typed broadcasts —
WithHub<T>().WithGroup().SendAsync<T>()for groups and filtered clients
Framework Support
| Target | Version |
|---|---|
| .NET (server + client) | .NET 8 / .NET 9 / .NET 10 |
| .NET Framework (client) | 4.6.2+ (via Cocoar.SignalARRR.Client.FullFramework) |
| TypeScript / JavaScript | Node.js 22 / modern browsers |
| Swift (iOS / macOS) | Swift 5.10+, iOS 14+ / macOS 11+ |
Building from Source
# .NET
dotnet build src/Cocoar.SignalARRR.slnx
dotnet test src/Cocoar.SignalARRR.slnx
# TypeScript
cd src/Cocoar.SignalARRR.Typescript && npm install && npm run build
# Swift
swift build && swift test
License
Apache License 2.0 — see LICENSE for details.
Contributing
See CONTRIBUTING.md for guidelines.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
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 |
|---|---|---|
| 4.3.2 | 39 | 6/13/2026 |
| 4.3.1 | 94 | 6/5/2026 |
| 4.3.0 | 91 | 5/16/2026 |
| 4.3.0-beta.7 | 64 | 4/3/2026 |
| 4.2.3 | 104 | 4/10/2026 |
| 4.2.2 | 104 | 4/3/2026 |
| 4.2.1 | 107 | 4/2/2026 |
| 4.2.0 | 103 | 4/2/2026 |
| 4.1.0 | 103 | 3/26/2026 |
| 4.0.0 | 104 | 3/23/2026 |
| 4.0.0-beta.16 | 55 | 3/22/2026 |
| 4.0.0-beta.15 | 53 | 3/22/2026 |
| 4.0.0-beta.8 | 60 | 3/3/2026 |
| 4.0.0-beta.6 | 57 | 3/3/2026 |
| 4.0.0-beta.2 | 65 | 3/3/2026 |
| 0.1.0-beta.85 | 67 | 2/28/2026 |