EllipticBit.Coalescence.Shared
1.5.6
dotnet add package EllipticBit.Coalescence.Shared --version 1.5.6
NuGet\Install-Package EllipticBit.Coalescence.Shared -Version 1.5.6
<PackageReference Include="EllipticBit.Coalescence.Shared" Version="1.5.6" />
<PackageVersion Include="EllipticBit.Coalescence.Shared" Version="1.5.6" />
<PackageReference Include="EllipticBit.Coalescence.Shared" />
paket add EllipticBit.Coalescence.Shared --version 1.5.6
#r "nuget: EllipticBit.Coalescence.Shared, 1.5.6"
#:package EllipticBit.Coalescence.Shared@1.5.6
#addin nuget:?package=EllipticBit.Coalescence.Shared&version=1.5.6
#tool nuget:?package=EllipticBit.Coalescence.Shared&version=1.5.6
EllipticBit.Coalescence.Shared
Shared support library for the Coalescence code generation system.
Coalescence generates strongly-typed Web API clients and servers from a single contract definition. This package contains the framework-agnostic primitives that the generated code and the other Coalescence runtime libraries (Request, AspNetCore, SignalR) build on, including the dependency-injection service builder, serialization abstractions, authentication abstractions, and the request/response contracts.
Features
AddCoalescenceServices()dependency-injection entry point returning anICoalescenceServiceBuilder.- Named, options-based configuration via
CoalescenceOptionsBaseandICoalescenceOptionsRepository. - Pluggable serialization through
ICoalescenceSerializerwith built-in JSON (CoalescenceJsonSerializer) and XML (CoalescenceXmlSerializer) implementations. - Authentication abstraction via
ICoalescenceAuthentication(with a no-opCoalescenceNullAuthenticationdefault). - Shared request/response contracts (
ICoalescenceRequest,ICoalescenceRequestFactory,ICoalescenceResponse, multipart content builders) consumed by the transport-specific packages.
Requirements
- Targets
.NET Standard 2.0, so it runs on .NET Framework 4.6.1+, .NET Core 2.0+, and modern .NET (.NET 8+).
Installation
Install from NuGet:
dotnet add package EllipticBit.Coalescence.Shared
Or add a PackageReference to your project file (replace the version with the latest published version):
<PackageReference Include="EllipticBit.Coalescence.Shared" Version="x.y.z" />
In most applications you will not reference this package directly. It is pulled in automatically by the transport packages such as
EllipticBit.Coalescence.Request.
Getting Started
Register the shared Coalescence services with the .NET dependency injection container. AddCoalescenceServices() returns an ICoalescenceServiceBuilder that the other Coalescence packages extend to register their named options.
using EllipticBit.Coalescence.Shared;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
// Registers the shared authentication and options repository services.
ICoalescenceServiceBuilder builder = services.AddCoalescenceServices();
Providing a custom serializer
Implement ICoalescenceSerializer to control how request and response bodies are (de)serialized, then supply it through the options of a transport package.
using EllipticBit.Coalescence.Shared;
public sealed class MyJsonSerializer : ICoalescenceSerializer
{
public string ContentType => "application/json";
public Task<string> Serialize<T>(T value) { /* ... */ }
public Task<T> Deserialize<T>(string content) { /* ... */ }
}
Providing custom authentication
Implement ICoalescenceAuthentication to attach credentials (bearer tokens, API keys, etc.) to outgoing requests:
using EllipticBit.Coalescence.Shared;
using Microsoft.Extensions.DependencyInjection;
services.AddCoalescenceServices();
services.AddTransient<ICoalescenceAuthentication, MyBearerTokenAuthentication>();
Related Packages
| Package | Description |
|---|---|
EllipticBit.Coalescence.Shared |
Shared abstractions (this package). |
EllipticBit.Coalescence.Request |
HTTP client transport built on HttpClient. |
EllipticBit.Coalescence.AspNetCore |
ASP.NET Core server-side support. |
EllipticBit.Coalescence.SignalR |
SignalR client transport support. |
License
Licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! To contribute:
- Fork the repository and create a feature branch.
- Make your changes, following the existing code style and conventions.
- Add or update tests where appropriate and ensure the solution builds.
- Open a merge/pull request with a clear description of the change and its motivation.
AI / LLM-assisted contributions
If any part of your contribution was generated with the assistance of a Large Language Model (LLM) or other generative AI tool, you must include the exact prompt(s) used to generate the contribution in the PROMPTS.txt file at the root of the repository. Append each prompt along with a short note describing what it produced. Pull requests containing LLM-generated content without the corresponding prompts will not be accepted.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- System.Collections.Immutable (>= 10.0.9)
- System.Text.Json (>= 10.0.9)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on EllipticBit.Coalescence.Shared:
| Package | Downloads |
|---|---|
|
EllipticBit.Coalescence.Request
HTTP support library for the Coalescence code generation system. Find it here: https://github.com/ellipticbit/coalescence-generator |
|
|
EllipticBit.Coalescence.AspNetCore
ASP.NET Core support library for the Coalescence code generation system. Find it here: https://github.com/ellipticbit/coalescence-generator |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.6 | 301 | 6/23/2026 |
| 1.5.4 | 281 | 5/9/2026 |
| 1.5.3 | 283 | 10/28/2025 |
| 1.5.2 | 963 | 3/26/2025 |
| 1.5.1 | 383 | 3/10/2025 |
| 1.3.9 | 238 | 1/29/2025 |
| 1.3.8 | 439 | 11/16/2024 |
| 1.3.7 | 347 | 10/9/2024 |
| 1.3.6 | 251 | 9/23/2024 |
| 1.3.5 | 503 | 9/12/2024 |
| 1.3.3 | 337 | 8/12/2024 |
| 1.2.9 | 331 | 5/10/2024 |
| 1.2.5 | 300 | 5/1/2024 |
| 1.2.4 | 265 | 2/14/2024 |