Skip to Content
0
Aug 07, 2016 at 08:31 AM

How to send event from PB.NET DLL to c# ?

92 Views

Hello, all

I have encountered the following problem during development of one of our modules.

There is a service, written in C# with .NET Framework 4.5 (this is a high version of C# language, lowering the framework version is not an option)

This module needs to use a PB.NET assembly, which handles complicated data manipulation. Everything was fine, until it became clear, that during the data manipulation (PB code) the system needs to access an external WS in specific cases. The WS client is also written in C# with framework 4.5, so I cannot add it as a reference to the PB.NET assembly project.

Question: is there a way to send an event (for example, using a delegate) from the PB.NET dll to the C#, which is calling it's functions?

This is a multi-threaded service, I need to notify it that there was a specific change in data, so it could do some other work asynchronously.

Is this at all possible, or will I have to rewrite the whole PB data manipulation module in C#?

Thank you

Arcady