TdsServer Class
A standalone TDS server.
public sealed class TdsServer : IDisposable- Implements
Constructors
| Name | Description |
|---|---|
| TdsServer(TdsServerOptions?, TdsAuthenticationDelegate, TdsQueryDelegate) | Initializes a new instance of the TdsServer class. |
| TdsServer(TdsServerOptions?, TdsAuthenticationDelegate, TdsQueryDelegate, ILogger?) | Initializes a new instance of the TdsServer class. |
TdsServer overloads
TdsServer(TdsServerOptions?, TdsAuthenticationDelegate, TdsQueryDelegate)
TdsServer.csInitializes a new instance of the TdsServer class.
public TdsServer(TdsServerOptions? options, TdsAuthenticationDelegate authenticationHandler, TdsQueryDelegate queryHandler)Parameters
optionsTdsServerOptions?authenticationHandlerTdsAuthenticationDelegatequeryHandlerTdsQueryDelegate
TdsServer(TdsServerOptions?, TdsAuthenticationDelegate, TdsQueryDelegate, ILogger?)
TdsServer.csInitializes a new instance of the TdsServer class.
public TdsServer(TdsServerOptions? options, TdsAuthenticationDelegate authenticationHandler, TdsQueryDelegate queryHandler, ILogger? logger)Parameters
optionsTdsServerOptions?- The server options, or
nullto use the defaults. authenticationHandlerTdsAuthenticationDelegate- The callback invoked to authenticate a login.
queryHandlerTdsQueryDelegate- The callback invoked to answer a query.
loggerILogger?- The logger used to report connection failures. When
nullnothing is logged, and a connection that fails to negotiate, authenticate or answer a query does so silently.
Properties
| Name | Description |
|---|---|
| Ports | Gets the ports currently bound by the server. |
| SqlServerBrowserPort | Gets the UDP port bound by the SQL Server Browser responder, or null when it is not running. |
Ports
TdsServer.csSqlServerBrowserPort
TdsServer.csGets the UDP port bound by the SQL Server Browser responder, or null when it is not running.
public int? SqlServerBrowserPort { get; }Methods
| Name | Description |
|---|---|
| Dispose() | Stops the server and releases resources. |
| StartAsync(CancellationToken) | Starts the server. |
Dispose()
TdsServer.csStops the server and releases resources.
public void Dispose()StartAsync(CancellationToken)
TdsServer.csStarts the server.
public Task StartAsync(CancellationToken cancellationToken = default)