EasyIPC 1.0.3

A simple way to allow transporting objects between several applications

Install-Package EasyIPC -Version 1.0.3
dotnet add package EasyIPC --version 1.0.3
<PackageReference Include="EasyIPC" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyIPC --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

EasyIPC

An inter process communication layer based on Win32, to make it easy to communicate and send objects between 2 applications.
IMPORTANT: The way this layer works is by the usage of mutex within the RAM. Since a mutex must be uniqe, it´s on your side to avoid exception by using an eventname more than once.

Implement EasyIPC Receiver

After loading the nuget package the implementation is quite simple.
First you have to implement an event based on the EasyIPC message delegate
You can see it by the following example

public event Eventer.MessageReceived LogMessageReceived;

Bind the event delegate to a handler method, where you want to handle the object, you will receive from outside.

 LogMessageReceived= OnLogMessageReceived;

Activate the receiver thread by a task run. Be sure to define the type of the object you will receive. The following example shows, that a string object will be received and handled.

Task.Run(() => Eventer.Receiver("mysimplestringevent", LogMessageReceived, Eventer.EVENTTYPE.TEXT));

You want to receive a string object from outside ... handle it :).
Be sure to interpret the sent object the right way, depending on the expected eventtype you defined within the task before.

   internal static void OnLogMessageReceived(object logMessage)
        {
            string receivedString = logMessage.ToString();
            // Do something awesome
        }

Implement EasyIPC Sender

The sender is much easier to implement, since its a simple line of code. Just be sure, that the event name, you will use fits the name you expect on the receiver part. Otherwise the event wont be fired.

Eventer.Sender("mysimplestringevent", "i am an awesome string");

EasyIPC

An inter process communication layer based on Win32, to make it easy to communicate and send objects between 2 applications.
IMPORTANT: The way this layer works is by the usage of mutex within the RAM. Since a mutex must be uniqe, it´s on your side to avoid exception by using an eventname more than once.

Implement EasyIPC Receiver

After loading the nuget package the implementation is quite simple.
First you have to implement an event based on the EasyIPC message delegate
You can see it by the following example

public event Eventer.MessageReceived LogMessageReceived;

Bind the event delegate to a handler method, where you want to handle the object, you will receive from outside.

 LogMessageReceived= OnLogMessageReceived;

Activate the receiver thread by a task run. Be sure to define the type of the object you will receive. The following example shows, that a string object will be received and handled.

Task.Run(() => Eventer.Receiver("mysimplestringevent", LogMessageReceived, Eventer.EVENTTYPE.TEXT));

You want to receive a string object from outside ... handle it :).
Be sure to interpret the sent object the right way, depending on the expected eventtype you defined within the task before.

   internal static void OnLogMessageReceived(object logMessage)
        {
            string receivedString = logMessage.ToString();
            // Do something awesome
        }

Implement EasyIPC Sender

The sender is much easier to implement, since its a simple line of code. Just be sure, that the event name, you will use fits the name you expect on the receiver part. Otherwise the event wont be fired.

Eventer.Sender("mysimplestringevent", "i am an awesome string");

Release Notes

Fixed Namespace.

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.3 202 10/15/2018