Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #796 from microsoft/DgmlmissingTypesNullFix
Browse files Browse the repository at this point in the history
DGML fails when there is unresolved dependency
  • Loading branch information
Lxiamail authored Aug 23, 2019
2 parents eb4c558 + c760a4c commit a45fc2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Task WriteStreamAsync(Stream stream, AnalyzeResponse response)
dgml.AddNode(nodeGuid, nodeTitle,
nodeCategory,
portabilityIndex,
group: missingTypes.Length == 0 ? null : "Collapsed");
group: string.IsNullOrEmpty(missingTypes) ? null : "Collapsed");

if (dgml.TryGetId(tfm, out Guid frameworkGuid))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ public bool TryGetAPICountFromReferences(int target, out int availAPIs, out int

foreach (var item in Nodes)
{
if (item.UsageData == null)
{
// skip the Node with no UsageData
continue;
}

if (!item.TryGetAPICountFromReferences(target, out int refCountAvail, out int refCountUnavail))
{
// Cycle!
Expand Down

0 comments on commit a45fc2f

Please sign in to comment.