Coflnet.Core
0.7.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Coflnet.Core --version 0.7.4
NuGet\Install-Package Coflnet.Core -Version 0.7.4
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="Coflnet.Core" Version="0.7.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Coflnet.Core" Version="0.7.4" />
<PackageReference Include="Coflnet.Core" />
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 Coflnet.Core --version 0.7.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Coflnet.Core, 0.7.4"
#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 Coflnet.Core@0.7.4
#: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=Coflnet.Core&version=0.7.4
#tool nuget:?package=Coflnet.Core&version=0.7.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CoflnetCore
Core library for our Microservices, producing, consuming, metrics etc
Setup
Add services in your Startup.cs or Program.cs file
builder.Services.AddCoflnetCore();
[...]
// register middlewares before controllers
app.UseCoflnetCore();
app.MapControllers();
Usage
Consuming
public class ConsumeService : BackgroundService
{
private readonly KafkaConsumer _consumer;
public MyController(KafkaConsumer consumer)
{
_consumer = consumer;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
await _consumer.Consume<string>("my-topic", async (message) =>
{
// do something with the message
}, stoppingToken);
}
}
OpenAPI documents
AddCoflnetOpenApi (called by AddCoflnetCore) shapes the generated OpenAPI document so clients generated from it compile and match the server:
- ApiException:
[ProducesResponseType(typeof(ApiException), 401)](and any subclass, e.g.ApiStatusException) is documented as the error body thatErrorHandlerreally sends, a$refto the sharedApiErrorResponsecomponent (slug,messagestrings and a nullabletrace). The System.Exception reflection types are not part of the document. The component is only added when the document references it. Subclasses are found by scanning the loaded assemblies when the swagger options are first resolved. A service class that is itself namedApiErrorResponseclashes with the component, generating the document throws anInvalidOperationExceptionnaming the clash, rename the class. A serviceErrorResponseclass is fine. A 400 response is still replaced by the generic inline error schema ofErrorResponseOperationFilter. - Enums: enums are sent as names, so the
enumlist has no numbers. Every enum schema (nullable enums included, also withUseInlineDefinitionsForEnums) additionally carriesx-enum-members(a list of{name, value}with the numeric value, ulong enums included) and, for[Flags]enums,x-flags: true. Theenumlist itself is not changed. Clients should read these extensions to rebuild the enum, a reference template for openapi-generator csharp isClient/templates/modelEnum.mustachein Coflnet/AneNotifier (added in PR #47). Limitation:x-enum-membersuses the C# member names. If the wire name differs ([JsonStringEnumMemberName]or a naming policy on the converter) the names do not match the values of theenumlist. object?properties and dictionary values: a schema whose type is onlynull(object?, the value ofDictionary<string, object?>) ends up with no type at all ({}) instead of anullonly type that openapi-generator turns into an enum (enum: [null]) that does not compile. This is done on the whole document, also forallOfwrappers, references and schemas with enum, properties, items or composition are not touched. Nullable strings, ints etc. are not affected.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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.
-
net10.0
- CassandraCSharpDriver (>= 3.23.0)
- Confluent.Kafka (>= 2.16.0)
- Confluent.Kafka.Extensions.OpenTelemetry (>= 0.4.0)
- FirebaseAdmin (>= 3.7.0)
- Messagepack (>= 3.1.12)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.13)
- Microsoft.AspNetCore.OpenApi (>= 10.0.13)
- Microsoft.Extensions.Configuration (>= 10.0.13)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.13)
- Microsoft.Extensions.Logging (>= 10.0.13)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.Console (>= 1.20.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.20.0)
- OpenTelemetry.Extensions.Hosting (>= 1.20.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.20.0)
- OpenTelemetry.Instrumentation.Http (>= 1.20.0)
- OpenTelemetry.Instrumentation.SqlClient (>= 1.20.0)
- prometheus-net.AspNetCore (>= 8.2.1)
- Swashbuckle.AspNetCore (>= 10.3.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Coflnet.Core:
| Package | Downloads |
|---|---|
|
Coflnet.Sky.Core
Hypixel Skyblock core library |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.6 | 5 | 10/29/2026 |
| 0.7.5 | 62 | 10/29/2026 |
| 0.7.4 | 503 | 10/20/2026 |
| 0.7.3 | 3,410 | 6/15/2026 |
| 0.7.2 | 145 | 6/14/2026 |
| 0.7.1 | 136 | 6/14/2026 |
| 0.7.0 | 2,493 | 3/30/2026 |
| 0.6.1 | 830 | 2/16/2026 |
| 0.6.0 | 1,994 | 10/22/2025 |
| 0.5.2 | 238 | 10/21/2025 |
| 0.5.1 | 7,976 | 4/16/2025 |
| 0.5.0 | 1,912 | 2/10/2025 |
| 0.4.5 | 1,198 | 1/3/2025 |
| 0.4.4 | 240 | 1/3/2025 |
| 0.4.3 | 230 | 1/2/2025 |
| 0.4.2 | 414 | 12/20/2024 |
| 0.4.1 | 235 | 12/14/2024 |
| 0.4.0 | 207 | 12/14/2024 |
| 0.3.0 | 1,799 | 11/4/2024 |
| 0.2.0 | 4,111 | 4/15/2024 |
Loading failed