mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-23 01:25:42 -05:00
Address error IDE0270 after MsBuild update (#1865)
This commit is contained in:
@@ -756,20 +756,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||
private static IEnumerable GetAttributeCollectionForChoiceElement(PropertyDescriptor property)
|
||||
{
|
||||
Type type = property.ComponentType;
|
||||
PropertyInfo pInfo = type.GetProperty("Items");
|
||||
|
||||
if (pInfo == null)
|
||||
{
|
||||
//Try using item.
|
||||
pInfo = type.GetProperty("Item");
|
||||
}
|
||||
|
||||
if (pInfo != null)
|
||||
{
|
||||
return pInfo.GetCustomAttributes(true);
|
||||
}
|
||||
|
||||
return property.Attributes;
|
||||
PropertyInfo pInfo = type.GetProperty("Items") ?? type.GetProperty("Item");
|
||||
return pInfo != null ? pInfo.GetCustomAttributes(true) : property.Attributes;
|
||||
}
|
||||
public static PropertyDescriptor CreateProperty(string propertyName, object value)
|
||||
{
|
||||
|
||||
@@ -384,12 +384,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||
nsMgr.AddNamespace("shp", "http://schemas.microsoft.com/sqlserver/2004/07/showplan");
|
||||
|
||||
//The root node in this case is the statement node
|
||||
XmlNode rootNode = stmtXmlDocument.DocumentElement;
|
||||
if(rootNode == null)
|
||||
{
|
||||
//Couldn't find our statement node, this should never happen in a properly formed document
|
||||
throw new ArgumentNullException("StatementNode");
|
||||
}
|
||||
//If couldn't find our statement node, throw exception, as this should never happen in a properly formed document
|
||||
XmlNode rootNode = stmtXmlDocument.DocumentElement ?? throw new ArgumentNullException("StatementNode");
|
||||
|
||||
XmlNode missingIndexes = rootNode.SelectSingleNode("descendant::shp:MissingIndexes", nsMgr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user