ServerFactory.Create(String, TraceSource, Func<Stream,Task>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a named pipe server.
public:
static IDisposable ^ Create(System::String ^ pipeName, System::Diagnostics::TraceSource ^ logger, Func<System::IO::Stream ^, System::Threading::Tasks::Task ^> ^ createAndConfigureService);
public static IDisposable Create(string pipeName, System.Diagnostics.TraceSource logger, Func<System.IO.Stream,System.Threading.Tasks.Task> createAndConfigureService);
static member Create : string * System.Diagnostics.TraceSource * Func<System.IO.Stream, System.Threading.Tasks.Task> -> IDisposable
Public Shared Function Create (pipeName As String, logger As TraceSource, createAndConfigureService As Func(Of Stream, Task)) As IDisposable
Parameters
- pipeName
- String
The name of the server.
- logger
- TraceSource
The logger for the server.
Callback function to be run whenever a client connects to the server.
Returns
A disposable server that should be disposed of when it is no longer needed. This object is also castable to IAsyncDisposable except if this method is referenced from Microsoft.ServiceHub.HostStub.dll.
Remarks
This method should only ever be used on Windows platforms.