internal IEnumerable <MetadataReference> GetReferencesForCompilation() { // TODO (tomat): RESOLVED? bound imports should be reused from previous submission instead of passing // them to every submission in the chain. See bug #7802. var previousSubmission = LastSubmission; if (previousSubmission != null) { return(previousSubmission.References.Concat(pendingReferences.AsEnumerable())); } else { return(pendingReferences.AsEnumerable()); } }
// internal for testing internal string ResolvePath(string path, string basePath, Func <string, bool> fileExists) { bool searchPathsUsed; string result = FileUtilities.ResolveRelativePath(path, basePath, searchPaths.AsEnumerable(), getFullPath, fileExists, out searchPathsUsed); if (!fileExists(result)) { return(null); } return(result); }
internal IEnumerable <MetadataReference> GetReferences(Session session) { var previousSubmission = (session != null) ? session.LastSubmission : null; IEnumerable <MetadataReference> references; if (previousSubmission != null) { references = previousSubmission.References; } else { references = initialAssemblyReferences.AsEnumerable(); } if (session != null) { references = references.Concat(session.PendingReferences.AsEnumerable()); } return(references); }
internal MethodBodyBinder CreateBodyBinder(ImplicitTypeConstructorSymbol owner) { // TODO: (tomat) is this correct? var compilation = ((SourceAssemblySymbol)owner.ContainingAssembly).Compilation; return(new MethodBodyBinder(new MethodBodyBinding(compilation, owner, Enclosing, statements.AsEnumerable()), Enclosing)); }