diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2019-07-22 12:52:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-22 12:52:29 +0300 |
commit | f7deb26c461cde05db325652bdf4d3a08efc928a (patch) | |
tree | 2c92856c1358b6cf46a50ecdd36e7891b5f7dbec /main/src/core/MonoDevelop.Core | |
parent | 6b910a66af3681856412f209c201f09a67866ad9 (diff) | |
parent | 8ba57c8b55493f51396ca9c253abea7c88904da5 (diff) |
Merge pull request #8251 from mono/msbuild-cleanup
[Core] Small cleanups in DefaultMSBuildEngine
Diffstat (limited to 'main/src/core/MonoDevelop.Core')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs index 1c14ad2329..1d488525cf 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/DefaultMSBuildEngine.cs @@ -519,7 +519,10 @@ namespace MonoDevelop.Projects.MSBuild { var exclude = ExcludeToRegex (remove); do { - foreach (var globInclude in project.GlobIncludes.Where (g => g.Item.Name == item.Name)) { + foreach (var globInclude in project.GlobIncludes) { + if (globInclude.Item.Name != item.Name) + continue; + if (globInclude.RemoveRegex != null) exclude = globInclude.RemoveRegex + "|" + exclude; globInclude.RemoveRegex = new Regex (exclude); @@ -867,10 +870,8 @@ namespace MonoDevelop.Projects.MSBuild static IEnumerable<string> GetIncludesForWildcardFilePath (MSBuildProject project, string path, Regex directoryExcludeRegex = null) { var subpath = SplitWildcardFilePath (path); - - WildcardExpansionFunc<string> func = delegate (string file, string include, string recursiveDir) { - return include; - }; + + WildcardExpansionFunc<string> func = (file, include, recursiveDir) => include; return ExpandWildcardFilePath (project, project.BaseDirectory, FilePath.Null, false, subpath.AsSpan (), func, directoryExcludeRegex); } @@ -1033,11 +1034,6 @@ namespace MonoDevelop.Projects.MSBuild } } - MSBuildItemEvaluated Evaluate (ProjectInfo project, MSBuildEvaluationContext context, MSBuildItem item) - { - return CreateEvaluatedItem (context, project, project.Project, item, context.EvaluateString (item.Include)); - } - IReadOnlyList<ProjectInfo> GetImportedProjects (ProjectInfo project, MSBuildImport import) { List<ProjectInfo> prefProjects; |