private SymbolTreeInfo(VersionStamp version, IReadOnlyList<Node> orderedNodes, SpellChecker spellChecker) : this(version, orderedNodes, new Lazy<SpellChecker>(() => spellChecker)) { // Make the lazy 'Created'. This is a no-op since we already have the underlying spell // checker. This way if we end up wanting to serialize this tree info, we'll also // serialize the spell checker. var unused = _lazySpellChecker.Value; }
private SymbolTreeInfo(VersionStamp version, IReadOnlyList<Node> orderedNodes, SpellChecker spellChecker) { _version = version; _nodes = orderedNodes; _spellChecker = spellChecker; }
internal static SymbolTreeInfo Create(VersionStamp version, IAssemblySymbol assembly, CancellationToken cancellationToken) { if (assembly == null) { return null; } var list = new List<Node>(); GenerateNodes(assembly.GlobalNamespace, list); var spellChecker = new SpellChecker(list.Select(n => n.Name)); return new SymbolTreeInfo(version, SortNodes(list), spellChecker); }