NeoNix-QtPy-Sdk-Serialization
2.0.2
dotnet add package NeoNix-QtPy-Sdk-Serialization --version 2.0.2
NuGet\Install-Package NeoNix-QtPy-Sdk-Serialization -Version 2.0.2
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="NeoNix-QtPy-Sdk-Serialization" Version="2.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NeoNix-QtPy-Sdk-Serialization" Version="2.0.2" />
<PackageReference Include="NeoNix-QtPy-Sdk-Serialization" />
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 NeoNix-QtPy-Sdk-Serialization --version 2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NeoNix-QtPy-Sdk-Serialization, 2.0.2"
#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 NeoNix-QtPy-Sdk-Serialization@2.0.2
#: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=NeoNix-QtPy-Sdk-Serialization&version=2.0.2
#tool nuget:?package=NeoNix-QtPy-Sdk-Serialization&version=2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NeoNix-QtPy-Sdk-Serialization
A .NET 8 library for JSON‑based messaging over TCP and JSON Schema generation for IMessage types.
Features
- MessageHub: Singleton for bi‑directional JSON messaging over TCP via
MessageHub.Init
,SendAsync
and background receive loop :contentReference[oaicite:11]{index=11}. - Dispatchable Handlers: Register, override or unregister typed callbacks implementing
IDispatchable
(Register
,Override
,UnRegiste
) to process incoming messages :contentReference[oaicite:12]{index=12}. - SchemaManager: Scan assemblies or the executing assembly, generate JSON Schemas for all concrete
IMessage
implementations, and write them to individual.json
files :contentReference[oaicite:13]{index=13}. - SocketManager: Robust TCP wrapper with length‑prefixed JSON send/receive and timeout support :contentReference[oaicite:14]{index=14}.
Getting Started
Install from NuGet
<PackageReference Include="NeoNix-QtPy-Sdk-Serialization" Version="1.0.0" />
Then restore and build:
dotnet restore
dotnet build -c Release
Basic Usage
using NeoNix_QtPy_Sdk_Serialization;
using NeoNix_QtPy_Sdk_Serialization.Services;
using NeoNix_QtPy_Sdk_Serialization.Interfaces;
// 1) Initialize connection
await MessageHub.Instance.Init("host.example.com", 12345);
// 2) Register a handler for IMessage types
var inbox = new MyDispatchableHandler(); // implements IDispatchable
MessageHub.Instance.Register(inbox);
// 3) Send a message
await MessageHub.Instance.SendAsync(inbox);
// 4) Export JSON Schemas to disk
MessageHub.ExportSchemas("schemas");
API Overview
IMessage
: Contract for payload types with aTitle
property .IDispatchable
: Handler interface exposingName
,Message
,ToJson()
, andInvoke()
.DispatchableBaseClass<T>
: Base implementation with typed callback andOnReceived
event .MessageDispatcher
: Internal router that invokes registeredIDispatchable
by message name .SocketManager
: Low‑level TCP socket helper with connect/send/receive and timeout logic .SchemaManager
: Static class to generate and write JSON Schema files fromIMessage
types in assemblies .
Contributing
- Fork the repo
- Create a branch:
git checkout -b feature/YourFeature
- Add tests and update docs
- Open a Pull Request against
main
Please follow existing code style and include unit tests where applicable.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Build.Framework (>= 17.15.0-preview-25277-114)
- Microsoft.Build.Utilities.Core (>= 17.15.0-preview-25277-114)
- NeoNix-QtPy-Models (>= 1.0.1)
- Newtonsoft.Json (>= 13.0.3)
- Newtonsoft.Json.Schema (>= 4.0.1)
- NJsonSchema (>= 11.3.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.