Imported Upstream version 4.8.0.344

Former-commit-id: 609085c14e6ad2a66429d180056034e93c0547d2
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-16 13:31:47 +00:00
parent 94b2861243
commit 62edeef69b
89 changed files with 4558 additions and 65 deletions

View File

@ -226,6 +226,14 @@ namespace Microsoft.Build.BuildEngine {
public void SetMetadata (string metadataName, public void SetMetadata (string metadataName,
string metadataValue, string metadataValue,
bool treatMetadataValueAsLiteral) bool treatMetadataValueAsLiteral)
{
SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral, false);
}
void SetMetadata (string metadataName,
string metadataValue,
bool treatMetadataValueAsLiteral,
bool fromDynamicItem)
{ {
if (metadataName == null) if (metadataName == null)
throw new ArgumentNullException ("metadataName"); throw new ArgumentNullException ("metadataName");
@ -251,9 +259,11 @@ namespace Microsoft.Build.BuildEngine {
} else if (HasParentItem) { } else if (HasParentItem) {
if (parent_item.child_items.Count > 1) if (parent_item.child_items.Count > 1)
SplitParentItem (); SplitParentItem ();
parent_item.SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral); parent_item.SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral, fromDynamicItem);
} }
if (FromXml || HasParentItem) {
// We don't want to reevalute the project for dynamic items
if (!fromDynamicItem && !IsDynamic && (FromXml || HasParentItem)) {
parent_item_group.ParentProject.MarkProjectAsDirty (); parent_item_group.ParentProject.MarkProjectAsDirty ();
parent_item_group.ParentProject.NeedToReevaluate (); parent_item_group.ParentProject.NeedToReevaluate ();
} }
@ -374,7 +384,7 @@ namespace Microsoft.Build.BuildEngine {
continue; continue;
foreach (string name in evaluatedMetadata.Keys) { foreach (string name in evaluatedMetadata.Keys) {
item.SetMetadata (name, (string)evaluatedMetadata [name]); item.SetMetadata (name, (string)evaluatedMetadata [name], false, IsDynamic);
} }
AddAndRemoveMetadata (project, item); AddAndRemoveMetadata (project, item);

View File

@ -697,6 +697,33 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
</Project>", "D"); </Project>", "D");
} }
[Test]
public void ItemGroupInsideTarget_UpdateMetadata ()
{
ItemGroupInsideTarget (
@"<Project ToolsVersion=""4.0"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
<ItemGroup>
<ProjectReference Include='xyz'/>
</ItemGroup>
<Target Name='Main' DependsOnTargets='CreateBar'>
<Message Text='Before: $(Bar)'/>
<ItemGroup>
<ProjectReference>
<AdditionalProperties>A=b</AdditionalProperties>
</ProjectReference>
</ItemGroup>
<Message Text='After: $(Bar)'/>
</Target>
<Target Name='CreateBar'>
<PropertyGroup>
<Bar>Bar01</Bar>
</PropertyGroup>
</Target>
</Project>", 2, "Before: Bar01", "After: Bar01");
}
[Test] [Test]
public void ItemGroupInsideTarget_Batching () public void ItemGroupInsideTarget_Batching ()
{ {

View File

@ -430,6 +430,7 @@ public class Tests : TestsBase, ITest2
ss_recursive2 (1); ss_recursive2 (1);
ss_recursive_chaotic (); ss_recursive_chaotic ();
ss_fp_clobber (); ss_fp_clobber ();
ss_no_frames ();
} }
[MethodImplAttribute (MethodImplOptions.NoInlining)] [MethodImplAttribute (MethodImplOptions.NoInlining)]
@ -679,6 +680,25 @@ public class Tests : TestsBase, ITest2
public static void ss_fp_clobber_2 (double d) { public static void ss_fp_clobber_2 (double d) {
} }
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_no_frames () {
Action a = ss_no_frames_2;
var ar = a.BeginInvoke (null, null);
ar.AsyncWaitHandle.WaitOne ();
// Avoid waiting every time this runs
if (static_i == 56)
Thread.Sleep (200);
ss_no_frames_3 ();
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_no_frames_2 () {
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void ss_no_frames_3 () {
}
[MethodImplAttribute (MethodImplOptions.NoInlining)] [MethodImplAttribute (MethodImplOptions.NoInlining)]
public static bool is_even (int i) { public static bool is_even (int i) {
return i % 2 == 0; return i % 2 == 0;

View File

@ -1 +1 @@
1933fc5e827372129731655297986401622ff064 8f929048d1b17809b27dc30940c81b379f1ec129

View File

@ -53,7 +53,7 @@ namespace System.ServiceModel.Channels
{ {
FaultCode fc = null; FaultCode fc = null;
FaultReason fr = null; FaultReason fr = null;
object details = null; string actor = null;
XmlDictionaryReader r = message.GetReaderAtBodyContents (); XmlDictionaryReader r = message.GetReaderAtBodyContents ();
r.ReadStartElement ("Fault", message.Version.Envelope.Namespace); r.ReadStartElement ("Fault", message.Version.Envelope.Namespace);
r.MoveToContent (); r.MoveToContent ();
@ -66,11 +66,13 @@ namespace System.ServiceModel.Channels
case "faultstring": case "faultstring":
fr = new FaultReason (r.ReadElementContentAsString()); fr = new FaultReason (r.ReadElementContentAsString());
break; break;
case "detail":
return new XmlReaderDetailMessageFault (message, r, fc, fr, null, null);
case "faultactor": case "faultactor":
actor = r.ReadElementContentAsString();
break;
case "detail":
return new XmlReaderDetailMessageFault (message, r, fc, fr, actor, null);
default: default:
throw new NotImplementedException (); throw new XmlException (String.Format ("Unexpected node {0} name {1}", r.NodeType, r.Name));
} }
r.MoveToContent (); r.MoveToContent ();
} }
@ -79,9 +81,7 @@ namespace System.ServiceModel.Channels
if (fr == null) if (fr == null)
throw new XmlException ("Reason is missing in the Fault message"); throw new XmlException ("Reason is missing in the Fault message");
if (details == null) return new SimpleMessageFault (fc, fr, false, null, null, actor, null);
return CreateFault (fc, fr);
return CreateFault (fc, fr, details);
} }
static MessageFault CreateFault12 (Message message, int maxBufferSize) static MessageFault CreateFault12 (Message message, int maxBufferSize)

View File

@ -71,6 +71,7 @@ namespace MonoTests.System.ServiceModel.Channels
<s:Fault> <s:Fault>
<faultcode>a:ActionNotSupported</faultcode> <faultcode>a:ActionNotSupported</faultcode>
<faultstring xml:lang='en-US'>some error</faultstring> <faultstring xml:lang='en-US'>some error</faultstring>
<faultactor>Random</faultactor>
</s:Fault> </s:Fault>
</s:Body> </s:Body>
</s:Envelope>"; </s:Envelope>";

View File

@ -135,10 +135,16 @@ namespace System.Xml.Serialization
void LookupTypeConvertor () void LookupTypeConvertor ()
{ {
// We only need this for System.Xml.Linq. // We only need this for System.Xml.Linq
var convertor = type.GetCustomAttribute<XmlTypeConvertorAttribute> (); var t = type;
if (convertor != null) // HACK: because interpreter array handling is so bad
typeConvertor = type.GetMethod (convertor.Method, BindingFlags.Static | BindingFlags.NonPublic); if (t.IsArray)
t = t.GetElementType ();
var convertor = t.GetCustomAttribute<XmlTypeConvertorAttribute> ();
if (convertor != null) {
typeConvertor = t.GetMethod (convertor.Method, BindingFlags.Static | BindingFlags.NonPublic);
}
} }
internal void ConvertForAssignment (ref object value) internal void ConvertForAssignment (ref object value)

View File

@ -738,6 +738,7 @@ namespace System.Xml.Serialization
if (type.IsArray) if (type.IsArray)
{ {
list = EnsureArrayIndex ((Array)list, index, type.GetElementType ()); list = EnsureArrayIndex ((Array)list, index, type.GetElementType ());
listType.ConvertForAssignment (ref value);
((Array)list).SetValue (value, index); ((Array)list).SetValue (value, index);
} }
else // Must be IEnumerable else // Must be IEnumerable

View File

@ -1 +1 @@
5415ff8e50a4beb760cc5825406fd6e49e7a3989 f93bbabc3d88e21bca92fc48e741c150f261a945

View File

@ -135,7 +135,7 @@ namespace Mono.Btls
if (IsServer) { if (IsServer) {
SetPrivateCertificate (nativeServerCertificate); SetPrivateCertificate (nativeServerCertificate);
} else { } else {
ssl.SetServerName (TargetHost); ssl.SetServerName (ServerName);
} }
} }
@ -236,14 +236,7 @@ namespace Mono.Btls
if (!IsServer) if (!IsServer)
ctx.SetSelectCallback (SelectCallback); ctx.SetSelectCallback (SelectCallback);
var host = TargetHost; ctx.SetVerifyParam (MonoBtlsProvider.GetVerifyParam (ServerName, IsServer));
if (!string.IsNullOrEmpty (host)) {
var pos = TargetHost.IndexOf (':');
if (pos > 0)
host = host.Substring (0, pos);
}
ctx.SetVerifyParam (MonoBtlsProvider.GetVerifyParam (host, IsServer));
TlsProtocolCode minProtocol, maxProtocol; TlsProtocolCode minProtocol, maxProtocol;
GetProtocolVersions (out minProtocol, out maxProtocol); GetProtocolVersions (out minProtocol, out maxProtocol);

View File

@ -35,6 +35,7 @@ namespace Mono.Net.Security
MobileAuthenticatedStream parent; MobileAuthenticatedStream parent;
bool serverMode; bool serverMode;
string targetHost; string targetHost;
string serverName;
SslProtocols enabledProtocols; SslProtocols enabledProtocols;
X509Certificate serverCertificate; X509Certificate serverCertificate;
X509CertificateCollection clientCertificates; X509CertificateCollection clientCertificates;
@ -54,6 +55,13 @@ namespace Mono.Net.Security
this.clientCertificates = clientCertificates; this.clientCertificates = clientCertificates;
this.askForClientCert = askForClientCert; this.askForClientCert = askForClientCert;
serverName = targetHost;
if (!string.IsNullOrEmpty (serverName)) {
var pos = serverName.IndexOf (':');
if (pos > 0)
serverName = serverName.Substring (0, pos);
}
certificateValidator = CertificateValidationHelper.GetInternalValidator ( certificateValidator = CertificateValidationHelper.GetInternalValidator (
parent.Settings, parent.Provider); parent.Settings, parent.Provider);
} }
@ -92,6 +100,10 @@ namespace Mono.Net.Security
get { return targetHost; } get { return targetHost; }
} }
protected string ServerName {
get { return serverName; }
}
protected bool AskForClientCertificate { protected bool AskForClientCertificate {
get { return askForClientCert; } get { return askForClientCert; }
} }

View File

@ -78,6 +78,16 @@ namespace System.Net.Sockets
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
} }
public void AllowNatTraversal (bool allowed)
{
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
public static TcpListener Create (int port)
{
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
~TcpListener () ~TcpListener ()
{ {
} }

View File

@ -204,6 +204,11 @@ namespace System.Net.Sockets
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
} }
public void AllowNatTraversal (bool allowed)
{
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
public void Dispose () public void Dispose ()
{ {
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

View File

@ -26,6 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// //
using System.Security.Authentication.ExtendedProtection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace System.Net { namespace System.Net {
@ -33,6 +34,8 @@ namespace System.Net {
{ {
internal const string EXCEPTION_MESSAGE = "System.Net.HttpListener is not supported on the current platform."; internal const string EXCEPTION_MESSAGE = "System.Net.HttpListener is not supported on the current platform.";
public delegate ExtendedProtectionPolicy ExtendedProtectionSelector (HttpListenerRequest request);
public HttpListener () public HttpListener ()
{ {
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
@ -75,6 +78,27 @@ namespace System.Net {
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
} }
public HttpListenerTimeoutManager TimeoutManager {
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
}
public ExtendedProtectionPolicy ExtendedProtectionPolicy
{
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
}
public ExtendedProtectionSelector ExtendedProtectionSelectorDelegate
{
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
}
public ServiceNameCollection DefaultServiceNames
{
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
}
public void Abort () public void Abort ()
{ {
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

View File

@ -55,6 +55,11 @@ namespace System.Net {
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
} }
public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol, TimeSpan keepAliveInterval)
{
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval) public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval)
{ {
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

View File

@ -67,12 +67,12 @@ namespace System.Net
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
} }
public bool AllowAutoRedirect { public virtual bool AllowAutoRedirect {
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
} }
public bool AllowWriteStreamBuffering { public virtual bool AllowWriteStreamBuffering {
get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
} }
@ -360,6 +360,11 @@ namespace System.Net
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
} }
public System.IO.Stream GetRequestStream (out TransportContext context)
{
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
}
public override IAsyncResult BeginGetResponse (AsyncCallback callback, object state) public override IAsyncResult BeginGetResponse (AsyncCallback callback, object state)
{ {
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);

View File

@ -74,6 +74,13 @@ namespace System.Runtime.InteropServices
return false; return false;
} }
[MonoTODO]
public static void CleanupUnusedObjectsInCurrentContext ()
{
if (Environment.IsRunningOnWindows)
throw new PlatformNotSupportedException ();
}
[MethodImplAttribute(MethodImplOptions.InternalCall)] [MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr AllocCoTaskMem (int cb); public extern static IntPtr AllocCoTaskMem (int cb);
@ -769,15 +776,8 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)] [MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static string PtrToStringUni (IntPtr ptr, int len); public extern static string PtrToStringUni (IntPtr ptr, int len);
#if !MOBILE
[MethodImplAttribute(MethodImplOptions.InternalCall)] [MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static string PtrToStringBSTR (IntPtr ptr); public extern static string PtrToStringBSTR (IntPtr ptr);
#else
public static string PtrToStringBSTR (IntPtr ptr)
{
throw new NotImplementedException ();
}
#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)] [MethodImplAttribute(MethodImplOptions.InternalCall)]
[ComVisible (true)] [ComVisible (true)]

View File

@ -1 +1 @@
d9eea5672d519baa2abbb431cd364b9620888b26 e275634bc2c909abbe355a3fe2f75b1a08b25558

View File

@ -1 +1 @@
4300ee601c5a3c592bf6808619b626189da4347f 8fb76ec050d22e5bb67a5dab3635c1998608ec6a

View File

@ -1 +1 @@
4a5d937cf3124b7461317b6d951a881da4f0a453 1035eebc45f582696603f7c18625e71de46627a7

Some files were not shown because too many files have changed in this diff Show More