ioctalk-codegen-binary-json-tcp 2.4.5

dotnet add package ioctalk-codegen-binary-json-tcp --version 2.4.5
NuGet\Install-Package ioctalk-codegen-binary-json-tcp -Version 2.4.5
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="ioctalk-codegen-binary-json-tcp" Version="2.4.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ioctalk-codegen-binary-json-tcp --version 2.4.5
#r "nuget: ioctalk-codegen-binary-json-tcp, 2.4.5"
#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.
// Install ioctalk-codegen-binary-json-tcp as a Cake Addin
#addin nuget:?package=ioctalk-codegen-binary-json-tcp&version=2.4.5

// Install ioctalk-codegen-binary-json-tcp as a Cake Tool
#tool nuget:?package=ioctalk-codegen-binary-json-tcp&version=2.4.5

IOC-Talk

Source Generator Nuget (.NET 7 or higher)

Combines dependency injection and remote procedure calls for enterprise architecture implementations without technical dependencies.

New slightly changed registration API. Uses .net code generator for communication proxy auto creation and dependency mapping. This is a performance improvement by eliminating runtime code generation and runtime assembly type scanning. The new binary wire format and binary message serializer reduces the transfer size as well.

var localShare = new LocalShareContext();

var tcpMyService = new TcpCommunicationController(new ShortWireFraming(), new JsonMessageSerializer());

var compositionHost = new TalkCompositionHost(localShare, "MyService");

// Maps all transfer interfaces to local implementations or source generated auto implementations
compositionHost.RegisterAutoGeneratedProxyInterfaceMappings();

// Creates a instance of MyServiceImplementation per session
compositionHost.RegisterLocalSessionService<IMyService, MyServiceImplementation>();

// Creates a instance of source generated IMyClientService proxy implementation per session
compositionHost.RegisterRemoteService<IMyClientService>();

// Creates a single instance of MyInternalStuffService (LocalShareContext singleton boundary)
compositionHost.RegisterLocalSharedService<IMyInternalStuffService, MyInternalStuffService>();


compositionHost.InitGenericCommunication(tcpMyService);

// bind to tcp port 14341
tcpMyService.InitService(14341);

If you need to connect to ioctalk legacy wire format services use:

new TcpCommunicationController(new LegacyWireFraming(), new JsonMessageSerializer())
❗ BinaryMessageSerializer is not production ready yet! Binary layout may change due to bugfixes!

Dependency less session handling

How can you react to distributed events (remote endpoint session changes) in your business code without having a dependency to the underlying transfer stack? The ioctalk solution is "constructor out delegate" injection and convention:

Functional service implementation assembly:

	public class MySuperService : IMySuperService
	{
		public MySuperService(out Action<IMySupremeRemoteClientService> clientServiceCreated, 
					out Action<IMySupremeRemoteClientService> clientServiceTerminated)
		{
			clientServiceCreated = OnClientServiceCreated;
			clientServiceTerminated = OnClientServiceTerminated;
		}

		private void OnClientServiceCreated(IMySupremeRemoteClientService client)
		{
			// available remote (or local - depending on the orchestration) client service instance
		}

		private void OnClientServiceTerminated(IMySupremeRemoteClientService client)
		{
		}
	}

By convention the ioctalk dependency injection container needs a "Created" or "Terminated" at the end of the method name.

If your service implementation only manages the single session instance, you can also use an IDisposable implementation to react on session termination. Be aware of not calling remote services in your constructor service implementation. Use constructor parameter (out Action<IMyService> myselfCreated) for remote interaction after the session is ready (all session instances are created).

Now you have separated your business code from any technical dependency. You can use it with ioctalk, within a unit test or some future transfer technology.

Product 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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.4.5 111 3/25/2024
2.4.4 97 2/28/2024
2.4.3 112 2/21/2024
2.4.2 88 2/15/2024
2.4.0 137 1/19/2024
2.3.64 111 1/8/2024
2.3.63 112 1/8/2024
2.3.62 100 1/8/2024
2.3.61 118 1/3/2024
2.3.60 110 1/2/2024
2.3.59 102 12/22/2023
2.3.56 146 11/21/2023
2.3.54 125 11/9/2023
2.3.51 228 8/11/2023
2.3.50 151 8/7/2023
2.3.47 174 7/7/2023
2.3.44 169 6/22/2023
2.3.30 142 6/7/2023

.NET Standard 2.1 version using improved tcp lib, binary and json serialization and proxy code generation at build time.