C# Класс NAPS2.Util.Pipes

Simple inter-process communication between NAPS2 instances via named pipes.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
KillServer ( ) : void

Kills the pipe server background thread if one is running.

SendMessage ( Process recipient, string msg ) : bool

Send a message to a NAPS2 instance running a pipe server.

StartServer ( Action msgCallback ) : void

Start a pipe server on a background thread, calling the callback each time a message is received. Only one pipe server can be running per process.

Приватные методы

Метод Описание
GetPipeName ( Process process ) : string

Описание методов

KillServer() публичный статический Метод

Kills the pipe server background thread if one is running.
public static KillServer ( ) : void
Результат void

SendMessage() публичный статический Метод

Send a message to a NAPS2 instance running a pipe server.
public static SendMessage ( Process recipient, string msg ) : bool
recipient System.Diagnostics.Process The process to send the message to.
msg string The message to send.
Результат bool

StartServer() публичный статический Метод

Start a pipe server on a background thread, calling the callback each time a message is received. Only one pipe server can be running per process.
public static StartServer ( Action msgCallback ) : void
msgCallback Action The message callback.
Результат void