mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-16 09:35:36 -05:00
setting timeout for oe tasks (#363)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using System;
|
||||
using Microsoft.SqlServer.Management.Smo;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
@@ -16,8 +17,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
{
|
||||
Table parentTable = parent as Table;
|
||||
Table historyTable = smoObject as Table;
|
||||
|
||||
return (parentTable.HistoryTableID == historyTable.ID);
|
||||
if (parentTable != null && historyTable != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (parentTable.HistoryTableID == historyTable.ID);
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
//TODO: have a better filtering here. HistoryTable is not available for SQL 2014.
|
||||
//and the property throws exception here
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user