Ejemplo n.º 1
0
        private IType GetTypeFromRoslynDom()
        {
            var candidates = Roots
                             .SelectMany(x => x.Descendants
                                         .OfType <IType>()
                                         .OfType <RoslynRDomBase>()
                                         .Where(y => y.Symbol == Symbol)
                                         )
                             .ToList();
            var count = candidates.Count();

            if (count == 1)
            {
                return(candidates.First() as IType);
            }
            else if (count > 1)
            {
                Guardian.AmbiguousType(Name);
                _searchFailed = true;
            }
            return(null);
        }