You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
@@ -28,6 +28,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -277,7 +278,7 @@ namespace Microsoft.Build.BuildEngine
|
||||
ParseParameters ();
|
||||
}
|
||||
|
||||
Dictionary<object,BuildRecord> build_records = new Dictionary<object, BuildRecord> ();
|
||||
ConcurrentDictionary<object,BuildRecord> build_records = new ConcurrentDictionary<object, BuildRecord> ();
|
||||
|
||||
object dummy_key = new object ();
|
||||
|
||||
@@ -292,11 +293,7 @@ namespace Microsoft.Build.BuildEngine
|
||||
// only Microsoft.Build.Internal.BuildEngine4 implements it so far.
|
||||
// (Used IBuildEngine3 because it needs to build for NET_4_0).
|
||||
var key = sender as IBuildEngine3 ?? dummy_key;
|
||||
if (!build_records.TryGetValue (key, out r)) {
|
||||
r = new BuildRecord (this);
|
||||
build_records.Add (key, r);
|
||||
}
|
||||
return r;
|
||||
return build_records.GetOrAdd (key, _ => new BuildRecord (this));
|
||||
}
|
||||
|
||||
public void BuildStartedHandler (object sender, BuildStartedEventArgs args)
|
||||
@@ -307,7 +304,7 @@ namespace Microsoft.Build.BuildEngine
|
||||
public void BuildFinishedHandler (object sender, BuildFinishedEventArgs args)
|
||||
{
|
||||
GetBuildRecord (sender).BuildFinishedHandler (args);
|
||||
build_records.Remove (sender);
|
||||
((IDictionary) build_records).Remove (sender);
|
||||
}
|
||||
|
||||
void PushEvent<T> (object sender, T args) where T: BuildStatusEventArgs
|
||||
@@ -903,7 +900,7 @@ namespace Microsoft.Build.BuildEngine
|
||||
void DumpPerformanceSummary ()
|
||||
{
|
||||
SetColor (eventColor);
|
||||
WriteLine ("Target perfomance summary:");
|
||||
WriteLine ("Target performance summary:");
|
||||
ResetColor ();
|
||||
|
||||
foreach (var pi in targetPerfTable.OrderBy (pair => pair.Value.Time))
|
||||
@@ -912,7 +909,7 @@ namespace Microsoft.Build.BuildEngine
|
||||
WriteLine (String.Empty);
|
||||
|
||||
SetColor (eventColor);
|
||||
WriteLine ("Tasks perfomance summary:");
|
||||
WriteLine ("Tasks performance summary:");
|
||||
ResetColor ();
|
||||
|
||||
foreach (var pi in tasksPerfTable.OrderBy (pair => pair.Value.Time))
|
||||
|
@@ -92,10 +92,12 @@ namespace Microsoft.Build.BuildEngine
|
||||
|
||||
object[] args;
|
||||
if (Arguments == null) {
|
||||
flags |= BindingFlags.GetProperty;
|
||||
if ((flags & BindingFlags.CreateInstance) == 0)
|
||||
flags |= BindingFlags.GetProperty;
|
||||
args = null;
|
||||
} else {
|
||||
flags |= BindingFlags.InvokeMethod;
|
||||
if ((flags & BindingFlags.CreateInstance) == 0)
|
||||
flags |= BindingFlags.InvokeMethod;
|
||||
ExpandArguments (project, options);
|
||||
args = PrepareMethodArguments (member_name, flags);
|
||||
if (args == null)
|
||||
@@ -105,7 +107,7 @@ namespace Microsoft.Build.BuildEngine
|
||||
object value;
|
||||
try {
|
||||
value = type.InvokeMember (member_name, flags, null, target, args, CultureInfo.InvariantCulture);
|
||||
} catch (MissingFieldException) {
|
||||
} catch (MissingMethodException) {
|
||||
//
|
||||
// It can be field/constant instead of a property
|
||||
//
|
||||
|
Reference in New Issue
Block a user