ServerFactory.Create 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.
Overloads
| Create(String, TraceSource, Func<Stream,Task>) |
Creates a named pipe server. |
| Create(String, TraceSource, Func<Stream,Task>, Boolean) |
Creates a named pipe server. |
Create(String, TraceSource, Func<Stream,Task>)
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.
Applies to
Create(String, TraceSource, Func<Stream,Task>, Boolean)
Creates a named pipe server.
public static IDisposable Create (string pipeName, System.Diagnostics.TraceSource logger, Func<System.IO.Stream,System.Threading.Tasks.Task> createAndConfigureService, bool setLowIntegrity = false);
static member Create : string * System.Diagnostics.TraceSource * Func<System.IO.Stream, System.Threading.Tasks.Task> * bool -> IDisposable
Public Shared Function Create (pipeName As String, logger As TraceSource, createAndConfigureService As Func(Of Stream, Task), Optional setLowIntegrity As Boolean = false) 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.
- setLowIntegrity
- Boolean
This property no longer does anything and will be removed in future versions of the API.
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.