Fixed the issue with parsing sql server 2017 version (#357)

* Fixed the issue with parsing sql server 2017
This commit is contained in:
Leila Lali
2017-05-24 12:07:41 -07:00
committed by GitHub
parent 63372d327e
commit 4861d7a174
8 changed files with 170 additions and 627 deletions

View File

@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.Linq;
using Microsoft.Data.Tools.DataSets;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Sdk.Sfc;
@@ -142,6 +143,18 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
return null;
}
protected IEnumerable<T> GetSmoCollectionResult<T>(HashSet<string> urns, SmoCollectionBase retValue, SqlSmoObject parent) where T : SqlSmoObject
{
if (urns != null)
{
return new SmoCollectionWrapper<T>(retValue).Where(c => PassesFinalFilters(parent, c) && urns.Contains(c.Urn));
}
else
{
return new SmoCollectionWrapper<T>(retValue).Where(c => PassesFinalFilters(parent, c));
}
}
}
}