public SourceSymbolCollection(PhpCompilation /*!*/ compilation) { Contract.ThrowIfNull(compilation); _compilation = compilation; _types = new SymbolsCache <QualifiedName, SourceTypeSymbol>(this, f => f.ContainedTypes, t => t.MakeQualifiedName(), t => !t.IsConditional || t.IsAnonymousType); _functions = new SymbolsCache <QualifiedName, SourceFunctionSymbol>(this, f => f.Functions, f => f.QualifiedName, f => !f.IsConditional); }
public SourceSymbolCollection(PhpCompilation /*!*/ compilation) { Contract.ThrowIfNull(compilation); _compilation = compilation; _types = new SymbolsCache <QualifiedName, SourceTypeSymbol>(this, f => f.ContainedTypes, t => t.MakeQualifiedName(), t => !t.IsConditional || t.IsAnonymousType); _functions = new SymbolsCache <QualifiedName, SourceFunctionSymbol>(this, f => f.Functions, f => f.QualifiedName, f => !f.IsConditional); // class <constants> { ... } PopulateDefinedConstants( this.DefinedConstantsContainer = _compilation.AnonymousTypeManager.SynthesizeType("<constants>", Accessibility.Internal), _compilation.Options.Defines); }