ClassPipeCommunication
Static methods used for NamedPipe communications.
Definition
Namespace:ArtOfTest.WebAii.Messaging.Process
Assembly:ArtOfTest.WebAii.dll
Syntax:
public static class PipeCommunication
Inheritance: objectPipeCommunication
Fields
CommandPipeName
The command pipe name
ServicePipeName
The async pipe name.
Methods
ReadCommandFromPipe<T>(PipeStream)
Reads a command from the pipe stream as a command object.
Declaration
public static T ReadCommandFromPipe<T>(PipeStream pipe) where T : PipeCommand
Parameters
pipe
The pipe to use.
Returns
T
The command
ReadMessageFromPipe<T>(PipeStream, IEnumerable<Type>)
Reads a pipe message from the pipe stream.
Declaration
public static T ReadMessageFromPipe<T>(PipeStream pipe, IEnumerable<Type> knownTypes = null) where T : PipeMessage
Parameters
pipe
The pipe to use.
knownTypes
Additional nested types required for deserialization.
Returns
T
The pipe message
WriteCommandToPipe(PipeCommand, PipeStream, bool)
Write a command to a specific named pipe.
Declaration
public static void WriteCommandToPipe(PipeCommand command, PipeStream pipe, bool waitForDrain)
Parameters
command
PipeCommand
The command
pipe
The pipe to use
waitForDrain
Whether to wait for the pipe to be drained.
WriteMessageToPipe<T>(T, PipeStream, bool, IEnumerable<Type>)
Write a pipe message to the pipe stream.
Declaration
public static void WriteMessageToPipe<T>(T data, PipeStream pipe, bool waitForDrain, IEnumerable<Type> knownTypes = null) where T : PipeMessage
Parameters
data
T
The pipe message.
pipe
The pipe to use.
waitForDrain
Whether to wait for the pipe to be drained.
knownTypes
Additional nested types required for serialization.