TdsServer Class

A standalone TDS server.

public sealed class TdsServer : IDisposable
Implements

Constructors

NameDescription
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.cs

Initializes a new instance of the TdsServer class.

public TdsServer(TdsServerOptions? options, TdsAuthenticationDelegate authenticationHandler, TdsQueryDelegate queryHandler)
Parameters
options TdsServerOptions?
authenticationHandler TdsAuthenticationDelegate
queryHandler TdsQueryDelegate

TdsServer(TdsServerOptions?, TdsAuthenticationDelegate, TdsQueryDelegate, ILogger?)

TdsServer.cs

Initializes a new instance of the TdsServer class.

public TdsServer(TdsServerOptions? options, TdsAuthenticationDelegate authenticationHandler, TdsQueryDelegate queryHandler, ILogger? logger)
Parameters
options TdsServerOptions?
The server options, or null to use the defaults.
authenticationHandler TdsAuthenticationDelegate
The callback invoked to authenticate a login.
queryHandler TdsQueryDelegate
The callback invoked to answer a query.
logger ILogger?
The logger used to report connection failures. When null nothing is logged, and a connection that fails to negotiate, authenticate or answer a query does so silently.

Properties

NameDescription
PortsGets the ports currently bound by the server.
SqlServerBrowserPortGets the UDP port bound by the SQL Server Browser responder, or null when it is not running.

Gets the ports currently bound by the server.

public IReadOnlyList<int> Ports { get; }

Property value

IReadOnlyList<int>

SqlServerBrowserPort

TdsServer.cs

Gets the UDP port bound by the SQL Server Browser responder, or null when it is not running.

public int? SqlServerBrowserPort { get; }

Methods

NameDescription
Dispose()Stops the server and releases resources.
StartAsync(CancellationToken)Starts the server.

Dispose()

TdsServer.cs

Stops the server and releases resources.

public void Dispose()

StartAsync(CancellationToken)

TdsServer.cs

Starts the server.

public Task StartAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task