/// <summary> /// Get the known types from the <see cref="AbstractSyntaxTree"/>. /// </summary> /// <param name="abstractSyntaxTree"></param> /// <returns></returns> public static List <KnownType> GetKnownTypes(AbstractSyntaxTree abstractSyntaxTree) { var harvester = new KnownTypesHarvester(); harvester.Visit(abstractSyntaxTree); return(harvester._knownTypes); }
public SemanticModel(AbstractSyntaxTree abstractSyntaxTree) { AbstractSyntaxTree = abstractSyntaxTree; _knownTypes = new Lazy <IReadOnlyCollection <KnownType> >( () => KnownTypesHarvester.GetKnownTypes(abstractSyntaxTree)); }