Example #1
0
 private static ApiInheritanceTreeBuildOutput ResolveInheritanceTree(InheritanceTree tree, string[] supportedLanguages, IReadOnlyDictionary <string, ApiNames> references)
 {
     return(new ApiInheritanceTreeBuildOutput
     {
         Type = ResolveApiNames(tree.Type, supportedLanguages, references),
         Inheritance = tree.Inheritance?.Select(item => ResolveInheritanceTree(item, supportedLanguages, references)).ToList(),
         Metadata = tree.Metadata
     });
 }
Example #2
0
        private IEnumerable <string> GetInheritanceUidReference(InheritanceTree item)
        {
            if (item == null)
            {
                yield break;
            }

            if (item.Inheritance != null)
            {
                foreach (var i in GetInheritanceUidReference(item.Inheritance))
                {
                    yield return(i);
                }
            }
            if (!string.IsNullOrEmpty(item.Type))
            {
                yield return(item.Type);
            }
        }
Example #3
0
 private static int CalculateInheritanceDepth(InheritanceTree tree)
 {
     return(CalculateInheritanceDepth(tree.Inheritance) + 1);
 }