diff options
| author | Roy Ben Shabat <Roy@twine-s.com> | 2020-12-30 15:11:34 +0000 |
|---|---|---|
| committer | Roy Ben Shabat <Roy@twine-s.com> | 2020-12-30 15:11:34 +0000 |
| commit | d33c19b3ac6803de4b5c8d475832efef131c1a45 (patch) | |
| tree | ea725abc39def99a755b041c13cba1fe0d594ddc /Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs | |
| parent | 1bdcaa9f51303bbff682507f31fb3b4414692ca4 (diff) | |
| download | Tango-d33c19b3ac6803de4b5c8d475832efef131c1a45.tar.gz Tango-d33c19b3ac6803de4b5c8d475832efef131c1a45.zip | |
Revert "Hope it is fine"
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs')
| -rw-r--r-- | Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs index f8cc7072d..2ead15d0d 100644 --- a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs +++ b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Intellisense/Utils.cs @@ -150,7 +150,12 @@ namespace Tango.Scripting.Editors.Intellisense var property = knownType.Properties[i]; var pDoc = docNodes.FirstOrDefault(x => x.Attributes["name"].InnerText.Contains(knownType.Type.Name + "." + property.Name)); - property.Summary = pDoc != null ? pDoc.SelectSingleNode("summary").InnerXml : "No documentation"; + + if (pDoc != null) + { + var summaryNode = pDoc.SelectSingleNode("summary"); + property.Summary = summaryNode != null ? summaryNode.InnerXml : "No documentation"; + } } } @@ -162,7 +167,12 @@ namespace Tango.Scripting.Editors.Intellisense { var field = knownType.Fields[i]; var pDoc = xmlDoc.SelectSingleNode("//member[starts-with(@name, '" + $"F:{knownType.Type.FullName}.{field.Name}" + "')]"); - field.Summary = pDoc != null ? pDoc.SelectSingleNode("summary").InnerXml : "No documentation"; + + if (pDoc != null) + { + var summaryNode = pDoc.SelectSingleNode("summary"); + field.Summary = summaryNode != null ? summaryNode.InnerXml : "No documentation"; + } } } } |
