mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 09:59:48 -05:00
Support updating access token when found expired for OE (#1772)
This commit is contained in:
@@ -14,11 +14,21 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
/// </summary>
|
||||
internal class SmoWrapper
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates instance of <see cref="Server"/> from provided <paramref name="serverConn"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="serverConn">Server connection instance.</param>
|
||||
/// <returns>Server instance.</returns>
|
||||
public virtual Server CreateServer(ServerConnection serverConn)
|
||||
{
|
||||
return serverConn == null ? null : new Server(serverConn);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if connection is open on the <paramref name="smoObj"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="smoObj">SMO Object containing connection context.</param>
|
||||
/// <returns>True if connection is open, otherwise false.</returns>
|
||||
public virtual bool IsConnectionOpen(SmoObjectBase smoObj)
|
||||
{
|
||||
SqlSmoObject sqlObj = smoObj as SqlSmoObject;
|
||||
@@ -28,6 +38,10 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
&& sqlObj.ExecutionManager.ConnectionContext.IsOpen;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens connection on the connection context of <paramref name="smoObj"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="smoObj">SMO Object containing connection context.</param>
|
||||
public virtual void OpenConnection(SmoObjectBase smoObj)
|
||||
{
|
||||
SqlSmoObject sqlObj = smoObj as SqlSmoObject;
|
||||
|
||||
Reference in New Issue
Block a user