mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-20 01:25:41 -05:00
Send a Object Explorer session disconnect message on socket exceptions (#739)
* WIP * WIP 2 * Send disconnect message o binding exception * Add a try catch around the binding queue error handler
This commit is contained in:
@@ -39,6 +39,29 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
|
||||
public string SessionId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Information returned when a session is disconnected.
|
||||
/// Contains success information and a <see cref="SessionId"/>
|
||||
/// </summary>
|
||||
public class SessionDisconnectedParameters
|
||||
{
|
||||
/// <summary>
|
||||
/// Boolean indicating if the connection was successful
|
||||
/// </summary>
|
||||
public bool Success { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique ID to use when sending any requests for objects in the
|
||||
/// tree under the node
|
||||
/// </summary>
|
||||
public string SessionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Error message returned from the engine for a object explorer session failure reason, if any.
|
||||
/// </summary>
|
||||
public string ErrorMessage { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Establishes an Object Explorer tree session for a specific connection.
|
||||
/// This will create a connection to a specific server or database, register
|
||||
@@ -50,4 +73,14 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
|
||||
RequestType<CloseSessionParams, CloseSessionResponse> Type =
|
||||
RequestType<CloseSessionParams, CloseSessionResponse>.Create("objectexplorer/closesession");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Session disconnected notification
|
||||
/// </summary>
|
||||
public class SessionDisconnectedNotification
|
||||
{
|
||||
public static readonly
|
||||
EventType<SessionDisconnectedParameters> Type =
|
||||
EventType<SessionDisconnectedParameters>.Create("objectexplorer/sessiondisconnected");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user