diff --git a/external/buildtools/src/Portable/Targets/v5.0/Microsoft.Portable.Common.targets b/external/buildtools/src/Portable/Targets/v5.0/Microsoft.Portable.Common.targets
index 0cdc0c05bc..7fbad28110 100644
--- a/external/buildtools/src/Portable/Targets/v5.0/Microsoft.Portable.Common.targets
+++ b/external/buildtools/src/Portable/Targets/v5.0/Microsoft.Portable.Common.targets
@@ -17,7 +17,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
true
- .NETPlatform,Version=v5.0;.NETStandard,Version=v1.0;.NETStandard,Version=v1.1;.NETStandard,Version=v1.2;.NETStandard,Version=v1.3;.NETStandard,Version=v1.4;.NETStandard,Version=v1.5
+ .NETPlatform,Version=v5.0;.NETStandard,Version=v1.0;.NETStandard,Version=v1.1;.NETStandard,Version=v1.2;.NETStandard,Version=v1.3;.NETStandard,Version=v1.4;.NETStandard,Version=v1.5;.NETStandard,Version=v1.6
diff --git a/mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/DynamicContext.cs b/mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/DynamicContext.cs
index d03145e0df..9c466c5ed9 100644
--- a/mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/DynamicContext.cs
+++ b/mcs/class/Microsoft.CSharp/Microsoft.CSharp.RuntimeBinder/DynamicContext.cs
@@ -93,8 +93,7 @@ namespace Microsoft.CSharp.RuntimeBinder
module.SetDeclaringAssembly (temp);
var importer = new Compiler.ReflectionImporter (module, cc.BuiltinTypes) {
- IgnorePrivateMembers = false,
- IgnoreCompilerGeneratedField = false
+ IgnorePrivateMembers = false
};
// Import all currently loaded assemblies
diff --git a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs
index 976b50109d..85e011bc27 100644
--- a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs
+++ b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs
@@ -29,6 +29,7 @@
using System;
using System.Reflection;
+using System.Reflection.Emit;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
@@ -295,6 +296,36 @@ namespace MonoTests.System.Linq.Expressions {
Assert.AreEqual ("foo42", lamda (42, "foo"));
}
+ [Test]
+ public void CallDynamicMethod_ToString ()
+ {
+ // Regression test for #49686
+ var m = new DynamicMethod ("intIntId", typeof (int), new Type [] { typeof (int) });
+ var ilg = m.GetILGenerator ();
+ ilg.Emit (OpCodes.Ldarg_0);
+ ilg.Emit (OpCodes.Ret);
+
+ var i = Expression.Parameter (typeof (int), "i");
+ var e = Expression.Call (m, i);
+
+ Assert.IsNotNull (e.ToString ());
+ }
+
+ [Test]
+ public void CallDynamicMethod_CompileInvoke ()
+ {
+ var m = new DynamicMethod ("intIntId", typeof (int), new Type [] { typeof (int) });
+ var ilg = m.GetILGenerator ();
+ ilg.Emit (OpCodes.Ldarg_0);
+ ilg.Emit (OpCodes.Ret);
+
+ var i = Expression.Parameter (typeof (int), "i");
+ var e = Expression.Call (m, i);
+
+ var lambda = Expression.Lambda> (e, i).Compile ();
+ Assert.AreEqual (42, lambda (42));
+ }
+
public static int Bang (Expression i)
{
return (int) (i as ConstantExpression).Value;
diff --git a/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs b/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs
index 4e76cad89f..82339f34b5 100644
--- a/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs
+++ b/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs
@@ -95,8 +95,15 @@ namespace Mono.Net.Security
sslStream = provider.CreateSslStream (networkStream, false, settings);
try {
+ var host = request.Host;
+ if (!string.IsNullOrEmpty (host)) {
+ var pos = host.IndexOf (':');
+ if (pos > 0)
+ host = host.Substring (0, pos);
+ }
+
sslStream.AuthenticateAsClient (
- request.Host, request.ClientCertificates,
+ host, request.ClientCertificates,
(SslProtocols)ServicePointManager.SecurityProtocol,
ServicePointManager.CheckCertificateRevocationList);
diff --git a/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs b/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
index e3c30a4e4b..24e02528ce 100644
--- a/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
@@ -210,15 +210,20 @@ namespace System.Reflection.Emit {
return this;
}
- [MonoTODO("Not implemented")]
public override object[] GetCustomAttributes (bool inherit) {
- throw new NotImplementedException ();
+ // support for MethodImplAttribute PCA
+ return new Object[] { new MethodImplAttribute(GetMethodImplementationFlags()) };
}
- [MonoTODO("Not implemented")]
public override object[] GetCustomAttributes (Type attributeType,
- bool inherit) {
- throw new NotImplementedException ();
+ bool inherit) {
+ if (attributeType == null)
+ throw new ArgumentNullException ("attributeType");
+
+ if (attributeType.IsAssignableFrom (typeof (MethodImplAttribute)))
+ return new Object[] { new MethodImplAttribute (GetMethodImplementationFlags()) };
+ else
+ return EmptyArray