Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2019-07-22 12:55:33 +0300
committerGitHub <noreply@github.com>2019-07-22 12:55:33 +0300
commitf3d2df0d337dbd080f37606a2900d496ab608e7d (patch)
tree1f313b2988f5c00df94c6f2952a9ee4f634d3c40 /main
parent4a02eec6874fb171ce542127924c131bedd58d7d (diff)
parentea855c0ac90842f77fbbb77bc55c8b6413f1fbc0 (diff)
Merge pull request #8246 from mono/msbuild-pi-key
[Core] Avoid allocating strings for keys when loading the MSBuild pro…
Diffstat (limited to 'main')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectInstance.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectInstance.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectInstance.cs
index 7c8df89ff8..a23254c86c 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectInstance.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectInstance.cs
@@ -145,13 +145,13 @@ namespace MonoDevelop.Projects.MSBuild
}
}
- var evalItems = new Dictionary<string,MSBuildItemEvaluated> ();
+ var evalItems = new Dictionary<(string, string),MSBuildItemEvaluated> ();
foreach (var it in e.GetEvaluatedItems (project)) {
var xit = it as MSBuildItemEvaluated;
if (xit == null) {
xit = CreateEvaluatedItem (e, it);
var itemId = e.GetItemMetadata (it, NodeIdPropertyName);
- var key = itemId + " " + xit.Include;
+ var key = (itemId, xit.Include);
if (evalItems.ContainsKey (key))
continue; // xbuild seems to return duplicate items when using wildcards. This is a workaround to avoid the duplicates.
MSBuildItem pit;
@@ -164,14 +164,14 @@ namespace MonoDevelop.Projects.MSBuild
evaluatedItems.Add (xit);
}
- var evalItemsNoCond = new Dictionary<string,MSBuildItemEvaluated> ();
+ var evalItemsNoCond = new Dictionary<(string, string),MSBuildItemEvaluated> ();
foreach (var it in e.GetEvaluatedItemsIgnoringCondition (project)) {
var xit = it as MSBuildItemEvaluated;
if (xit == null) {
xit = CreateEvaluatedItem (e, it);
var itemId = e.GetItemMetadata (it, NodeIdPropertyName);
MSBuildItemEvaluated evItem;
- var key = itemId + " " + xit.Include;
+ var key = (itemId, xit.Include);
if (evalItemsNoCond.ContainsKey (key))
continue; // xbuild seems to return duplicate items when using wildcards. This is a workaround to avoid the duplicates.
if (!string.IsNullOrEmpty (itemId) && evalItems.TryGetValue (key, out evItem)) {