Merge pull request #3453 from ntherning/cleanup-AssemblyTest-temp-file-handling
authorMarek Safar <marek.safar@gmail.com>
Mon, 29 Aug 2016 14:46:04 +0000 (16:46 +0200)
committerGitHub <noreply@github.com>
Mon, 29 Aug 2016 14:46:04 +0000 (16:46 +0200)
Cleanup temp file handling in AssemblyTest

161 files changed:
mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Construction/ProjectRootElementTest.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ToolsetTest.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectTargetInstanceTest.cs
mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectTaskInstanceTest.cs
mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
mcs/class/Mono.Debugger.Soft/Test/dtest.cs
mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CompareAttributeTest.cs
mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CreditCardAttributeTest.cs
mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/EmailAddressAttributeTest.cs
mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/FileExtensionsAttributeTest.cs
mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/PhoneAttributeTest.cs
mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs
mcs/class/System.Data/Test/System.Data.Common/DbDataReaderTest.cs
mcs/class/System.IdentityModel/Test/System.IdentityModel.Tokens/BootstrapContextTest.cs
mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs
mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs
mcs/class/System.Security/System.Security.Cryptography.Pkcs/EnvelopedCms.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/AddressHeader.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/AddressHeaderCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingContext.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingElementCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelBase.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelFactoryBase.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/CustomBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageEncodingBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageFault.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeader.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageVersion.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/IContractBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/IEndpointBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/IOperationBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IClientMessageFormatter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IClientMessageInspector.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SecureConversationSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel/ActionNotSupportedException.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
mcs/class/System.ServiceModel/System.ServiceModel/CommunicationException.cs
mcs/class/System.ServiceModel/System.ServiceModel/CommunicationObjectAbortedException.cs
mcs/class/System.ServiceModel/System.ServiceModel/CommunicationObjectFaultedException.cs
mcs/class/System.ServiceModel/System.ServiceModel/DnsEndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs
mcs/class/System.ServiceModel/System.ServiceModel/EndpointNotFoundException.cs
mcs/class/System.ServiceModel/System.ServiceModel/FaultCode.cs
mcs/class/System.ServiceModel/System.ServiceModel/FaultException.cs
mcs/class/System.ServiceModel/System.ServiceModel/InvalidMessageContractException.cs
mcs/class/System.ServiceModel/System.ServiceModel/MessageHeaderException.cs
mcs/class/System.ServiceModel/System.ServiceModel/MessageHeader_1.cs
mcs/class/System.ServiceModel/System.ServiceModel/ProtocolException.cs
mcs/class/System.ServiceModel/System.ServiceModel/QuotaExceededException.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServerTooBusyException.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceActivationException.cs
mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/UpnEndpointIdentity.cs
mcs/class/System.ServiceModel/Test/MetadataTests/ImportTests.cs
mcs/class/System.ServiceModel/Test/MetadataTests/MetadataSamples.cs
mcs/class/System.Web/Test/System.Web.Security/MachineKeyTest.cs
mcs/class/System.Web/Test/System.Web.Security/MembershipPasswordAttributeTest.cs
mcs/class/System.Web/Test/System.Web/EventHandlerTaskAsyncHelperTest.cs
mcs/class/System.Web/Test/System.Web/HttpTaskAsyncHandlerTest.cs
mcs/class/System.Web/Test/System.Web/TaskAsyncResultTest.cs
mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs
mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs
mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs
mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs
mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs
mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs
mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
mcs/class/System/System.IO.Compression/DeflateStream.cs
mcs/class/System/System.IO.Compression/GZipStream.cs
mcs/class/System/System.Net.Sockets/Socket.cs
mcs/class/System/System.Security.AccessControl/SemaphoreAccessRule.cs
mcs/class/System/System.Security.AccessControl/SemaphoreAuditRule.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509KeyUsageExtension.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtension.cs
mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs
mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs
mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs
mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
mcs/class/System/Test/System.Net/WebClientTest.cs
mcs/class/System/Test/System.Net/WebClientTestAsync.cs
mcs/class/System/Test/System/UriPermutationsTest.cs
mcs/class/System/Test/System/UriTest.cs
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
mcs/class/corlib/Test/System.Collections.Generic/ComparerTest.cs
mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
mcs/class/corlib/Test/System.IO/MemoryStreamTest.cs
mcs/class/corlib/Test/System.IO/StreamReaderTest.cs
mcs/class/corlib/Test/System.IO/StreamTest.cs
mcs/class/corlib/Test/System.IO/StreamWriterTest.cs
mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs
mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
mcs/class/corlib/Test/System.Reflection/IntrospectionExtensionsTest.cs
mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncVoidMethodBuilderTest.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest_T.cs
mcs/class/corlib/Test/System.Runtime.CompilerServices/YieldAwaitableTest.cs
mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs
mcs/class/corlib/Test/System.Security.Claims/ClaimsIdentityTest.cs
mcs/class/corlib/Test/System.Security.Claims/ClaimsPrincipalTest.cs
mcs/class/corlib/Test/System.Threading.Tasks/ConcurrentExclusiveSchedulerPairTest.cs
mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs
mcs/class/corlib/Test/System.Threading/VolatileTest.cs
mcs/class/corlib/Test/System/ArraySegmentTest.cs
mcs/class/corlib/Test/System/ConsoleTest.cs
mcs/class/corlib/Test/System/WeakReferenceTest.cs
mcs/class/referencesource/System.Core/System/threading/ReaderWriterLockSlim/ReaderWriterLockSlim.cs
mcs/errors/cs0246-36.cs [new file with mode: 0644]
mcs/mcs/expression.cs
mcs/mcs/statement.cs
mcs/tests/test-async-88.cs [new file with mode: 0644]
mcs/tests/ver-il-net_4_x.xml
mcs/tools/corcompare/mono-api-info.cs
mcs/tools/mono-api-html/MemberComparer.cs
mono/metadata/boehm-gc.c
mono/metadata/class-internals.h
mono/metadata/icall-def.h
mono/metadata/lock-tracer.c
mono/metadata/metadata.c
mono/metadata/metadata.h
mono/metadata/null-gc.c
mono/metadata/object-internals.h
mono/metadata/reflection.c
mono/metadata/sgen-os-coop.c
mono/metadata/sre-internals.h
mono/metadata/sre-save.c
mono/metadata/sre.c
mono/metadata/threads.c
mono/mini/Makefile.am.in
mono/mini/alias-analysis.c
mono/mini/aot-runtime.c
mono/mini/decompose.c
mono/mini/main.c
mono/mini/mini-amd64.c
mono/mini/mini-llvm.c
mono/mini/mini-native-types.c
mono/mini/mini.h
mono/tests/libtest.c
mono/tests/pinvoke2.cs
mono/utils/mono-threads-posix.c
mono/utils/mono-threads-windows.c
mono/utils/mono-threads.c
mono/utils/mono-threads.h
msvc/libmonoruntime.vcxproj
msvc/libmonoruntime.vcxproj.filters

index a3e24ede013d8de80d1786bb558efecd7d8fab91..c0665fc07095af47bbc5f7c9de2f7093f5288ba2 100644 (file)
@@ -28,12 +28,12 @@ namespace System.Net.Sockets
                 state: socket);
         }
 
-        public static Task ConnectAsync(this Socket socket, EndPoint remoteEndPoint)
+        public static Task ConnectAsync(this Socket socket, EndPoint remoteEP)
         {
             return Task.Factory.FromAsync(
                 (targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
                 asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
-                remoteEndPoint,
+                remoteEP,
                 state: socket);
         }
 
@@ -229,7 +229,7 @@ namespace System.Net.Sockets
             this Socket socket,
             ArraySegment<byte> buffer,
             SocketFlags socketFlags,
-            EndPoint remoteEndPoint)
+            EndPoint remoteEP)
         {
             return Task<int>.Factory.FromAsync(
                 (targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
@@ -243,7 +243,7 @@ namespace System.Net.Sockets
                 asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
                 buffer,
                 socketFlags,
-                remoteEndPoint,
+                remoteEP,
                 state: socket);
         }
     }
index e864f4dfb3923773798acbc766d35e5c8c1376e5..2fbb9f18587853bd786d5125f7e73cd2a2a68e7f 100644 (file)
@@ -58,11 +58,9 @@ namespace MonoTests.Microsoft.Build.Construction
                                ProjectRootElement.Create (XmlReader.Create (new StringReader (" <root/>")));
                                Assert.Fail ("should throw InvalidProjectFileException");
                        } catch (InvalidProjectFileException ex) {
-                               #if NET_4_5
                                Assert.AreEqual (1, ex.LineNumber, "#1");
                                // it is very interesting, but unlike XmlReader.LinePosition it returns the position for '<'.
                                Assert.AreEqual (2, ex.ColumnNumber, "#2");
-                               #endif
                        }
                }
 
@@ -102,11 +100,9 @@ namespace MonoTests.Microsoft.Build.Construction
                                ProjectRootElement.Create (xml);
                                Assert.Fail ("should throw InvalidProjectFileException");
                        } catch (InvalidProjectFileException ex) {
-                               #if NET_4_5
                                Assert.AreEqual (1, ex.LineNumber, "#1");
                                // unlike unexpected element case which returned the position for '<', it does return the name start char...
                                Assert.AreEqual (70, ex.ColumnNumber, "#2");
-                               #endif
                        }
                }
 
index 970240fa74bda41ddb4db3b1b399e5d0e5c79211..700a41663d3b77777c48d5fc8408383a625bab50 100644 (file)
@@ -44,9 +44,7 @@ namespace MonoTests.Microsoft.Build.Evaluation
                {
                        var g = ProjectCollection.GlobalProjectCollection;
                        Assert.AreEqual (0, g.GlobalProperties.Count, "#1");
-                       #if NET_4_5
                        Assert.IsTrue (g.GlobalProperties.IsReadOnly, "#2");
-                       #endif
                }
                
                [Test]
index ac4e2d6610e7805edaebaaf6000e334b0f9b5c29..81392010d79782990e53bb98b5c5c385ff2a5479 100644 (file)
@@ -40,11 +40,9 @@ namespace MonoTests.Microsoft.Build.Evaluation
                        var ts = new Toolset ("4.3", "c:\\", ProjectCollection.GlobalProjectCollection, null);
                        Assert.IsNotNull (ts.Properties, "#1");
                        Assert.AreEqual (0, ts.Properties.Count, "#2");
-#if NET_4_5
                        Assert.IsNull (ts.DefaultSubToolsetVersion, "#3");
                        Assert.IsNotNull (ts.SubToolsets, "#4");
                        Assert.AreEqual (0, ts.SubToolsets.Count, "#5");
-#endif
                        Assert.AreEqual ("c:\\", ts.ToolsPath, "#6");
                        Assert.AreEqual ("4.3", ts.ToolsVersion, "#7");
                }
index ce13ce36469c04301533b099a8b023bbaff34683..5b24db55b27dc3247f7a1a9b5f726f1962efba82 100644 (file)
@@ -143,9 +143,7 @@ namespace MonoTests.Microsoft.Build.Execution
                        var root = ProjectRootElement.Create (xml);
                        root.FullPath = "ProjectInstanceTest.DependsOnTargets.proj";
                        var proj = new ProjectInstance (root);
-#if NET_4_5
                        Assert.AreEqual (2, proj.Targets.Count, "#1");
-#endif
                        Assert.IsFalse (proj.Build ("Bar", new ILogger [0]), "#2");
                }
                
index c94bef7d695da5454c2c73592fe838d51f7ebd0d..1663f71c682d768de1712ba13fa76f77e32c47d3 100644 (file)
@@ -42,7 +42,6 @@ namespace MonoTests.Microsoft.Build.Execution
        [TestFixture]
        public class ProjectTaskInstanceTest
        {
-#if NET_4_5
                [Test]
                public void OutputPropertyExists ()
                {
@@ -78,7 +77,6 @@ namespace MonoTests.Microsoft.Build.Execution
                        Assert.AreEqual (string.Empty, foo.Outputs, "#6");
                        Assert.AreEqual ("True", proj.GetPropertyValue ("C"), "#7");
                }
-#endif
        }
 }
 
index 6617c146f6e138bb2e93ff51df41e1db164d1d84..cc2ab66960fa5f3ed36e6e70c52278f6a27d6fac 100644 (file)
@@ -829,9 +829,7 @@ public class Tests : TestsBase, ITest2
        }
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
-#if NET_4_5
        [StateMachine (typeof (int))]
-#endif
        public static void locals2<T> (string[] args, int arg, T t, ref string rs, ref AStruct astruct) {
                long i = 42;
                string s = "AB";
@@ -1184,12 +1182,10 @@ public class Tests : TestsBase, ITest2
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public static void unhandled_exception_user () {
-#if NET_4_5
                System.Threading.Tasks.Task.Factory.StartNew (() => {
                                Throw ();
                        });
                Thread.Sleep (10000);
-#endif
        }
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
index 88ed411da35bcabcf36968da7de70dcaa9fc7d16..018435051777ac312d0831c2d71682ef37c6bee6 100644 (file)
@@ -2447,7 +2447,6 @@ public class DebuggerTests
                        Assert.AreEqual ("Exception", ex.Exception.Type.Name);
                }
 
-#if NET_4_5
                // out argument
                m = t.GetMethod ("invoke_out");
                var out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) }, InvokeOptions.ReturnOutArgs);
@@ -2460,7 +2459,6 @@ public class DebuggerTests
                out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) });
                out_args = out_task.Result.OutArgs;
                Assert.IsNull (out_args);
-#endif
 
                // newobj
                m = t.GetMethod (".ctor");
@@ -2484,7 +2482,6 @@ public class DebuggerTests
                v = t.InvokeMethod (e.Thread, m, new Value [] { vm.RootDomain.CreateString ("ABC") }, InvokeOptions.Virtual);
                AssertValue ("ABC", v);
 
-#if NET_4_5
                // instance
                m = t.GetMethod ("invoke_pass_ref");
                var task = this_obj.InvokeMethodAsync (e.Thread, m, new Value [] { vm.RootDomain.CreateString ("ABC") });
@@ -2494,7 +2491,6 @@ public class DebuggerTests
                m = t.GetMethod ("invoke_static_pass_ref");
                task = t.InvokeMethodAsync (e.Thread, m, new Value [] { vm.RootDomain.CreateString ("ABC") });
                AssertValue ("ABC", task.Result);
-#endif
 
                // Argument checking
                
@@ -2588,7 +2584,6 @@ public class DebuggerTests
                v = t.InvokeMethod (e.Thread, m, new Value [] { vm.CreateValue (1) });
                AssertValue (1, (v as StructMirror)["i"]);
 
-#if NET_4_5
                // Invoke a method which changes state
                s = frame.GetArgument (1) as StructMirror;
                t = s.Type;
@@ -2615,7 +2610,6 @@ public class DebuggerTests
                m = vm.RootDomain.Corlib.GetType ("System.Object").GetMethod ("ToString");
                v = s.InvokeMethod (e.Thread, m, null, InvokeOptions.Virtual);
                AssertValue ("42", v);
-#endif
        }
 
        [Test]
@@ -3790,7 +3784,6 @@ public class DebuggerTests
                vm = null;
        }
 
-#if NET_4_5
        [Test]
        public void UnhandledExceptionUserCode () {
                vm.Detach ();
@@ -3811,7 +3804,6 @@ public class DebuggerTests
                vm.Exit (0);
                vm = null;
        }
-#endif
 
        [Test]
        public void GCWhileSuspended () {
index dc95296fbed551d7da20859dbab91e5f821b4ca7..d98c051699e6d8e3e16a4896ac4d6e8f1f834242 100644 (file)
@@ -36,7 +36,6 @@ using MonoTests.Common;
 
 namespace MonoTests.System.ComponentModel.DataAnnotations
 {
-#if NET_4_5
        [TestFixture]
        public class CompareAttributeTest
        {
@@ -66,5 +65,4 @@ namespace MonoTests.System.ComponentModel.DataAnnotations
                        Assert.IsNotNull (sla.GetValidationResult (DateTime.Now, ctx), "#B-4");
                }
        }
-#endif
 }
index 846ee326176cf4aaa46dd69ba1421be78055a3af..00cc74573f4a174f276b9c3882654a8e829926fc 100644 (file)
@@ -36,7 +36,6 @@ using MonoTests.Common;
 
 namespace MonoTests.System.ComponentModel.DataAnnotations
 {
-#if NET_4_5
        [TestFixture]
        public class CreditCardAttributeTest
        {
@@ -56,5 +55,4 @@ namespace MonoTests.System.ComponentModel.DataAnnotations
                        Assert.IsFalse (sla.IsValid (DateTime.Now), "#A1-8");
                }
        }
-#endif
 }
index 552e3eae6a44da5ba82b9dfc5e24f6604f6a0b9b..f85887cef65a51e78d8769ed6f5d130342301dab 100644 (file)
@@ -36,7 +36,6 @@ using MonoTests.Common;
 
 namespace MonoTests.System.ComponentModel.DataAnnotations
 {
-#if NET_4_5
        [TestFixture]
        public class EmailAddressAttributeTest
        {
@@ -84,5 +83,4 @@ namespace MonoTests.System.ComponentModel.DataAnnotations
                                Assert.IsFalse (sla.IsValid (InvalidAddresses[i]), "#B1-{0}", i);
                }
        }
-#endif
 }
index 257161fc06c0998d4ed161a1a55c587d85337c47..6ef0263365ce154383e65d1aef9a42887ae5b032 100644 (file)
@@ -36,7 +36,6 @@ using MonoTests.Common;
 
 namespace MonoTests.System.ComponentModel.DataAnnotations
 {
-#if NET_4_5
        [TestFixture]
        public class FileExtensionsAttributeTest
        {
@@ -57,5 +56,4 @@ namespace MonoTests.System.ComponentModel.DataAnnotations
                        Assert.IsFalse (sla.IsValid (DateTime.Now), "#A1-8");
                }
        }
-#endif
 }
index 3ca6e0bf3d42c2c5bc022c8848f877aae9cc191a..ef9c95dfb755847dbda80726394c0488fc663563 100644 (file)
@@ -36,7 +36,6 @@ using MonoTests.Common;
 
 namespace MonoTests.System.ComponentModel.DataAnnotations
 {
-#if NET_4_5
        [TestFixture]
        public class PhoneAttributeTest
        {
@@ -54,5 +53,4 @@ namespace MonoTests.System.ComponentModel.DataAnnotations
                        Assert.IsFalse (sla.IsValid (DateTime.Now), "#A1-7");
                }
        }
-#endif
 }
index 4877d434a20c62afb5eb11c4277b62ee74d70ea5..9cb4b8a6eeae73078ce759004903398213075241 100644 (file)
@@ -38,6 +38,8 @@ using Mono.Data.Tds.Protocol;
 using System;
 using System.IO;
 using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
 using System.Collections;
 using System.ComponentModel;
 using System.Data;
@@ -1426,6 +1428,25 @@ namespace System.Data.SqlClient
                        throw new NotImplementedException ();   
                }
 
+               override public Task<T> GetFieldValueAsync<T> (int i, CancellationToken cancellationToken)
+               {
+                       return base.GetFieldValueAsync<T> (i, cancellationToken);
+               }
+
+               override public Stream GetStream (int i)
+               {
+                       return base.GetStream (i);
+               }
+               override public TextReader GetTextReader (int i)
+               {
+                       return base.GetTextReader (i);
+               }
+
+               override public Task<bool> IsDBNullAsync (int i, CancellationToken cancellationToken)
+               {
+                       return base.IsDBNullAsync (i, cancellationToken);
+               }
+
                #endregion // Methods
        }
 }
index 20d5c1ab0bf41c9e87f2eb16d793df4693eb67fe..ff7ebcbe0c4358ba1fd7e16beaf28bb15975c929 100644 (file)
@@ -61,7 +61,6 @@ namespace MonoTests.System.Data.Common
                {
                }
 
-               #if NET_4_5
                [Test]
                public void GetFieldValueTest ()
                {
@@ -155,7 +154,6 @@ namespace MonoTests.System.Data.Common
                        Assert.IsFalse (dataReader.Read (), "#5");
                }
 
-               #endif //NET_4_5
        }
 }
 
index 1d5090748cd12476a0c682e30a969bbb1c69611a..d55b6a06923f1f595cefa32666c6244339da49aa 100644 (file)
@@ -2,7 +2,6 @@
 // BootstrapContextTest.cs - NUnit Test Cases for System.IdentityModel.Tokens.BootstrapContext
 //
 
-#if NET_4_5
 using System;
 using System.IO;
 using System.IdentityModel.Tokens;
@@ -248,4 +247,3 @@ namespace MonoTests.System.IdentityModel.Tokens.net_4_5 {
                }
        }
 }
-#endif
index d836c1e4ff2b75442e9e59883be7e127f316a278..27c57d109251c83dbfc42e9ebf1ebba3a5328216 100644 (file)
@@ -45,15 +45,15 @@ namespace System.Security.Cryptography.Pkcs {
                        _params = new byte [0];
                }
 
-               public AlgorithmIdentifier (Oid algorithm)
+               public AlgorithmIdentifier (Oid oid)
                {
-                       _oid = algorithm;
+                       _oid = oid;
                        _params = new byte [0];
                }
 
-               public AlgorithmIdentifier (Oid algorithm, int keyLength)
+               public AlgorithmIdentifier (Oid oid, int keyLength)
                {
-                       _oid = algorithm;
+                       _oid = oid;
                        _length = keyLength;
                        _params = new byte [0];
                }
index 32b675abb28ac40a7af30d039ecab9d79120aeca..3bf9efb989dc9bb946960b5bd771dfc3f3b33f23 100644 (file)
@@ -53,14 +53,14 @@ namespace System.Security.Cryptography.Pkcs {
                {
                } 
 
-               public ContentInfo (Oid oid, byte[] content) 
+               public ContentInfo (Oid contentType, byte[] content) 
                {
-                       if (oid == null)
-                               throw new ArgumentNullException ("oid");
+                       if (contentType == null)
+                               throw new ArgumentNullException ("contentType");
                        if (content == null)
                                throw new ArgumentNullException ("content");
 
-                       _oid = oid;
+                       _oid = contentType;
                        _content = content;
                }
 
index 1f57f5c55169931680496f4ed99ac4b1fd1e2aa6..3942e5bba1bb2f4a49e07374b3a01c6766360c62 100644 (file)
@@ -61,12 +61,12 @@ namespace System.Security.Cryptography.Pkcs {
                        _uattribs = new CryptographicAttributeObjectCollection ();
                }
 
-               public EnvelopedCms (ContentInfo content) : this ()
+               public EnvelopedCms (ContentInfo contentInfo) : this ()
                {
-                       if (content == null)
-                               throw new ArgumentNullException ("content");
+                       if (contentInfo == null)
+                               throw new ArgumentNullException ("contentInfo");
 
-                       _content = content;
+                       _content = contentInfo;
                }
 
                public EnvelopedCms (ContentInfo contentInfo, AlgorithmIdentifier encryptionAlgorithm)
index 4372574e1ee682c41f15f46b2d90d94aa816086d..1e07c4830d9bab68512ff729edc9e9647e048656 100644 (file)
@@ -45,9 +45,9 @@ namespace System.ServiceModel.Channels
                        return new DefaultAddressHeader (value);
                }
 
-               public static AddressHeader CreateAddressHeader (object value, XmlObjectSerializer formatter)
+               public static AddressHeader CreateAddressHeader (object value, XmlObjectSerializer serializer)
                {
-                       return new DefaultAddressHeader (value, formatter);
+                       return new DefaultAddressHeader (value, serializer);
                }
 
                public static AddressHeader CreateAddressHeader (string name, string ns, object value)
@@ -56,11 +56,11 @@ namespace System.ServiceModel.Channels
                }
 
                public static AddressHeader CreateAddressHeader (string name, string ns, object value, 
-                                                                XmlObjectSerializer formatter)
+                                                                XmlObjectSerializer serializer)
                {
-                       if (formatter == null)
-                               throw new ArgumentNullException ("formatter");
-                       return new DefaultAddressHeader (name, ns, value, formatter);
+                       if (serializer == null)
+                               throw new ArgumentNullException ("serializer");
+                       return new DefaultAddressHeader (name, ns, value, serializer);
                }
 
                public override bool Equals (object obj)
@@ -93,9 +93,9 @@ namespace System.ServiceModel.Channels
                        return GetValue<T> (new DataContractSerializer (typeof (T)));
                }
 
-               public T GetValue<T> (XmlObjectSerializer formatter)
+               public T GetValue<T> (XmlObjectSerializer serializer)
                {
-                       return (T) formatter.ReadObject (GetAddressHeaderReader ());
+                       return (T) serializer.ReadObject (GetAddressHeaderReader ());
                }
 
                protected abstract void OnWriteAddressHeaderContents (XmlDictionaryWriter writer);
index 3969ad3b5718affc8e44b05ed9633bc680d4199b..e8f2470d560aac4091cbfd6ad4840eb2a8f5a338 100644 (file)
@@ -47,8 +47,8 @@ namespace System.ServiceModel.Channels
                {
                }
 
-               public AddressHeaderCollection (IEnumerable<AddressHeader> headers)
-                       : base (GetList (headers))
+               public AddressHeaderCollection (IEnumerable<AddressHeader> addressHeaders)
+                       : base (GetList (addressHeaders))
                {
                }
 
index 06e682748d36104e694baf03bf8a44aa6604e1d5..2fecf2264681fbf522acf63c01b639ce6c9e81cb 100644 (file)
@@ -44,17 +44,17 @@ namespace System.ServiceModel.Channels
                BindingElementCollection elements; // for internal use
 
                public BindingContext (CustomBinding binding,
-                       BindingParameterCollection parms)
+                       BindingParameterCollection parameters)
                {
                        if (binding == null)
                                throw new ArgumentNullException ("binding");
-                       if (parms == null)
-                               throw new ArgumentNullException ("parms");
+                       if (parameters == null)
+                               throw new ArgumentNullException ("parameters");
 
                        this.binding = binding;
-                       parameters = new BindingParameterCollection ();
-                       foreach (var item in parms)
-                               parameters.Add (item);
+                       this.parameters = new BindingParameterCollection ();
+                       foreach (var item in parameters)
+                               this.parameters.Add (item);
                        this.elements = new BindingElementCollection ();
                        foreach (var item in binding.Elements)
                                this.elements.Add (item);
index a41eb6ed6deda42ab106de8c342b7cfb121d31df..be628e07ccb4bab99490552553ad709a2ccb3ad0 100644 (file)
@@ -40,7 +40,7 @@ namespace System.ServiceModel.Channels
                }
 
                [MonoTODO]
-               protected BindingElement (BindingElement other)
+               protected BindingElement (BindingElement elementToBeCloned)
                {
                }
 
index 762cb61b517513fc5a2cb5d42280a6367dc818a7..ea1fa491efa307fe767b38dc8dc94863bfea73ed 100644 (file)
@@ -38,14 +38,14 @@ namespace System.ServiceModel.Channels
                {
                }
 
-               public BindingElementCollection (BindingElement [] bindings)
+               public BindingElementCollection (BindingElement [] elements)
                {
-                       AddRange (bindings);
+                       AddRange (elements);
                }
 
-               public BindingElementCollection (IEnumerable<BindingElement> bindings)
+               public BindingElementCollection (IEnumerable<BindingElement> elements)
                {
-                       foreach (BindingElement e in bindings)
+                       foreach (BindingElement e in elements)
                                Add (e);
                }
 
index 693799434b3a819f530b61b1abb0beea42d04419..b251375659c2ba4eeab423badc432a29b093a2e1 100644 (file)
@@ -39,9 +39,9 @@ namespace System.ServiceModel.Channels
        {
                ChannelManagerBase manager;
 
-               protected ChannelBase (ChannelManagerBase manager)
+               protected ChannelBase (ChannelManagerBase channelManager)
                {
-                       this.manager = manager;
+                       this.manager = channelManager;
                }
 
                protected internal override TimeSpan DefaultCloseTimeout {
index cd573744e202d5b912c2f2e0d38c51751ae02738..d4df2f0f12fbe00c94cc284c68bbbf2a7299b997 100644 (file)
@@ -98,29 +98,29 @@ namespace System.ServiceModel.Channels
                }
 
                public TChannel CreateChannel (
-                       EndpointAddress remoteAddress)
+                       EndpointAddress address)
                {
-                       if (remoteAddress == null)
-                               throw new ArgumentNullException ("remoteAddress");
-                       return CreateChannel (remoteAddress, remoteAddress.Uri);
+                       if (address == null)
+                               throw new ArgumentNullException ("address");
+                       return CreateChannel (address, address.Uri);
                }
 
                public TChannel CreateChannel (
-                       EndpointAddress remoteAddress, Uri via)
+                       EndpointAddress address, Uri via)
                {
-                       if (remoteAddress == null)
-                               throw new ArgumentNullException ("remoteAddress");
+                       if (address == null)
+                               throw new ArgumentNullException ("address");
                        if (via == null)
                                throw new ArgumentNullException ("via");
 
                        ValidateCreateChannel ();
-                       var ch = OnCreateChannel (remoteAddress, via);
+                       var ch = OnCreateChannel (address, via);
                        channels.Add (ch);
                        return ch;
                }
 
                protected abstract TChannel OnCreateChannel (
-                       EndpointAddress remoteAddress, Uri via);
+                       EndpointAddress address, Uri via);
 
                protected override void OnAbort ()
                {
index cecbb8ccb120f20d974ebc7ef45dd543a33b4915..feb1f9ae7758247e9ce9563dccc7d1c09d4d0e25 100644 (file)
@@ -68,19 +68,19 @@ namespace System.ServiceModel.Channels
                        security = binding as ISecurityCapabilities;
                }
 
-               public CustomBinding (params BindingElement [] binding)
-                       : this ("CustomBinding", default_ns, binding)
+               public CustomBinding (params BindingElement [] bindingElementsInTopDownChannelStackOrder)
+                       : this ("CustomBinding", default_ns, bindingElementsInTopDownChannelStackOrder)
                {
                }
 
-               public CustomBinding (IEnumerable<BindingElement> bindingElements)
-                       : this (bindingElements, "CustomBinding", default_ns)
+               public CustomBinding (IEnumerable<BindingElement> bindingElementsInTopDownChannelStackOrder)
+                       : this (bindingElementsInTopDownChannelStackOrder, "CustomBinding", default_ns)
                {
                }
 
                public CustomBinding (string name, string ns,
-                       params BindingElement [] binding)
-                       : this (binding, name, ns)
+                       params BindingElement [] bindingElementsInTopDownChannelStackOrder)
+                       : this (bindingElementsInTopDownChannelStackOrder, name, ns)
                {
                }
 
index 37217165ecf94daf58a4a61d0330987cc36828a7..a2918a06e6dcb4e573c28addc3a4453b311dc60b 100644 (file)
@@ -47,20 +47,20 @@ namespace System.ServiceModel.Channels
 
                [MonoTODO]
                protected abstract bool OnTryCreateException (
-                       Message message, MessageFault fault, out Exception error);
+                       Message message, MessageFault fault, out Exception exception);
 
                [MonoTODO]
                protected abstract bool OnTryCreateFaultMessage (
-                       Exception error, out Message message);
+                       Exception exception, out Message message);
 
-               public bool TryCreateException (Message message, MessageFault fault, out Exception error)
+               public bool TryCreateException (Message message, MessageFault fault, out Exception exception)
                {
-                       return OnTryCreateException (message, fault, out error);
+                       return OnTryCreateException (message, fault, out exception);
                }
 
-               public bool TryCreateFaultMessage (Exception error, out Message message)
+               public bool TryCreateFaultMessage (Exception exception, out Message message)
                {
-                       return OnTryCreateFaultMessage (error, out message);
+                       return OnTryCreateFaultMessage (exception, out message);
                }
        }
 
index 191a182dfc70d4903f68d234834e0e11a25e09bc..d3c70970adfcd8490014b5cdfea51b888c8adfd7 100644 (file)
@@ -67,28 +67,28 @@ namespace System.ServiceModel.Channels
                }
 
                protected HttpTransportBindingElement (
-                       HttpTransportBindingElement other)
-                       : base (other)
+                       HttpTransportBindingElement elementToBeCloned)
+                       : base (elementToBeCloned)
                {
-                       allow_cookies = other.allow_cookies;
-                       bypass_proxy_on_local = other.bypass_proxy_on_local;
-                       unsafe_ntlm_auth = other.unsafe_ntlm_auth;
-                       use_default_proxy = other.use_default_proxy;
-                       keep_alive_enabled = other.keep_alive_enabled;
-                       max_buffer_size = other.max_buffer_size;
-                       host_cmp_mode = other.host_cmp_mode;
-                       proxy_address = other.proxy_address;
-                       realm = other.realm;
-                       transfer_mode = other.transfer_mode;
+                       allow_cookies = elementToBeCloned.allow_cookies;
+                       bypass_proxy_on_local = elementToBeCloned.bypass_proxy_on_local;
+                       unsafe_ntlm_auth = elementToBeCloned.unsafe_ntlm_auth;
+                       use_default_proxy = elementToBeCloned.use_default_proxy;
+                       keep_alive_enabled = elementToBeCloned.keep_alive_enabled;
+                       max_buffer_size = elementToBeCloned.max_buffer_size;
+                       host_cmp_mode = elementToBeCloned.host_cmp_mode;
+                       proxy_address = elementToBeCloned.proxy_address;
+                       realm = elementToBeCloned.realm;
+                       transfer_mode = elementToBeCloned.transfer_mode;
                        // FIXME: it does not look safe
-                       timeouts = other.timeouts;
-                       auth_scheme = other.auth_scheme;
-                       proxy_auth_scheme = other.proxy_auth_scheme;
-
-                       DecompressionEnabled = other.DecompressionEnabled;
-                       LegacyExtendedProtectionPolicy = other.LegacyExtendedProtectionPolicy;
-                       ExtendedProtectionPolicy = other.ExtendedProtectionPolicy;
-                       cookie_manager = other.cookie_manager;
+                       timeouts = elementToBeCloned.timeouts;
+                       auth_scheme = elementToBeCloned.auth_scheme;
+                       proxy_auth_scheme = elementToBeCloned.proxy_auth_scheme;
+
+                       DecompressionEnabled = elementToBeCloned.DecompressionEnabled;
+                       LegacyExtendedProtectionPolicy = elementToBeCloned.LegacyExtendedProtectionPolicy;
+                       ExtendedProtectionPolicy = elementToBeCloned.ExtendedProtectionPolicy;
+                       cookie_manager = elementToBeCloned.cookie_manager;
                }
 
                [DefaultValue (AuthenticationSchemes.Anonymous)]
index d281d484d8689e10310d8bc680b94ee6b7992d08..3d890b95142d29f5ba2e8d49730c6a6086843103 100644 (file)
@@ -47,10 +47,10 @@ namespace System.ServiceModel.Channels
                }
 
                protected HttpsTransportBindingElement (
-                       HttpsTransportBindingElement other)
-                       : base (other)
+                       HttpsTransportBindingElement elementToBeCloned)
+                       : base (elementToBeCloned)
                {
-                       req_cli_cert = other.req_cli_cert;
+                       req_cli_cert = elementToBeCloned.req_cli_cert;
                }
 
                public bool RequireClientCertificate {
index f67ce5dd8ad5a357f0d1408aec19137c4e16ac62..1b6be5ad60d66d7d4064dcf22255545d65abf0a7 100644 (file)
@@ -98,10 +98,10 @@ namespace System.ServiceModel.Channels
                        return OnGetBody<T> (GetReaderAtBodyContents ());
                }
 
-               public T GetBody<T> (XmlObjectSerializer xmlFormatter)
+               public T GetBody<T> (XmlObjectSerializer serializer)
                {
                        // FIXME: Somehow use OnGetBody() here as well?
-                       return (T)xmlFormatter.ReadObject (GetReaderAtBodyContents ());
+                       return (T)serializer.ReadObject (GetReaderAtBodyContents ());
                }
 
                protected virtual T OnGetBody<T> (XmlDictionaryReader reader)
@@ -369,13 +369,13 @@ namespace System.ServiceModel.Channels
 
                // 5)
                public static Message CreateMessage (MessageVersion version,
-                       string action, object body, XmlObjectSerializer xmlFormatter)
+                       string action, object body, XmlObjectSerializer serializer)
                {
                        return body == null ?
                                CreateMessage (version, action) :
                                CreateMessage (
                                        version, action,
-                                       new XmlObjectSerializerBodyWriter (body, xmlFormatter));
+                                       new XmlObjectSerializerBodyWriter (body, serializer));
                }
 
                // 6)
index bc3405e53412e455543ef1039a2ded8e49846225..9a40e499eb2806b29820caaace34b34d874d859a 100644 (file)
@@ -42,9 +42,9 @@ namespace System.ServiceModel.Channels
 
                [MonoTODO]
                public
-               MessageEncodingBindingElement (MessageEncodingBindingElement source)
+               MessageEncodingBindingElement (MessageEncodingBindingElement elementToBeCloned)
                {
-                       MessageVersion = source.MessageVersion;
+                       MessageVersion = elementToBeCloned.MessageVersion;
                }
 
                public abstract MessageEncoderFactory
@@ -52,11 +52,11 @@ namespace System.ServiceModel.Channels
 
                public abstract MessageVersion MessageVersion { get; set; }
 
-               public override T GetProperty<T> (BindingContext ctx)
+               public override T GetProperty<T> (BindingContext context)
                {
                        if (typeof (T) == typeof (MessageVersion))
                                return (T) (object) MessageVersion;
-                       return ctx.GetInnerProperty<T> ();
+                       return context.GetInnerProperty<T> ();
                }
 
 #if !MOBILE && !XAMMAC_4_5
index 3e809c4b1372773663015b841a8fa0ea60d86286..e8e10533584f1277fdcfea277cf69ca0bdb89415 100644 (file)
@@ -397,12 +397,12 @@ namespace System.ServiceModel.Channels
                        return GetDetail<T> (new DataContractSerializer (typeof (T)));
                }
 
-               public T GetDetail<T> (XmlObjectSerializer formatter)
+               public T GetDetail<T> (XmlObjectSerializer serializer)
                {
                        if (!HasDetail)
                                throw new InvalidOperationException ("This message does not have details.");
 
-                       return (T) formatter.ReadObject (GetReaderAtDetailContents ());
+                       return (T) serializer.ReadObject (GetReaderAtDetailContents ());
                }
 
                public XmlDictionaryReader GetReaderAtDetailContents ()
index 4e37df9c865837039543d01319d9fb10a582c0bf..4769523848907ce28b261a5a778a3612dcc393ef 100644 (file)
@@ -59,56 +59,56 @@ namespace System.ServiceModel.Channels
                        return CreateHeader (name, ns, value, default_must_understand);
                }
 
-               public static MessageHeader CreateHeader (string name, string ns, object value, bool must_understand)
+               public static MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand)
                {
-                       return CreateHeader (name, ns, value, must_understand, default_actor);
+                       return CreateHeader (name, ns, value, mustUnderstand, default_actor);
                }
 
-               public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter)
+               public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer)
                {
-                       return CreateHeader (name, ns, value, formatter, default_must_understand, 
+                       return CreateHeader (name, ns, value, serializer, default_must_understand, 
                                             default_actor, default_relay);
                }
 
                public static MessageHeader CreateHeader (string name, string ns, object value, 
-                                                  bool must_understand, string actor)
+                                                  bool mustUnderstand, string actor)
                {
-                       return CreateHeader (name, ns, value, must_understand, actor, default_relay);
+                       return CreateHeader (name, ns, value, mustUnderstand, actor, default_relay);
                }
 
-               public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter, 
-                                                  bool must_understand)
+               public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer, 
+                                                  bool mustUnderstand)
                {
-                       return CreateHeader (name, ns, value, formatter, must_understand, default_actor, default_relay);
+                       return CreateHeader (name, ns, value, serializer, mustUnderstand, default_actor, default_relay);
                }
                
                public static MessageHeader CreateHeader (string name, string ns, object value, 
-                                                  bool must_understand, string actor, bool relay)
+                                                  bool mustUnderstand, string actor, bool relay)
                {
                        return CreateHeader (name, ns, value, new DataContractSerializer (value.GetType ()),
-                                       must_understand, actor, relay);
+                                       mustUnderstand, actor, relay);
                }
 
-               public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter,
-                                                  bool must_understand, string actor)
+               public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
+                                                  bool mustUnderstand, string actor)
                {
-                       return CreateHeader (name, ns, value, formatter, must_understand, actor, default_relay);
+                       return CreateHeader (name, ns, value, serializer, mustUnderstand, actor, default_relay);
                }
                
-               public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter,
-                                                  bool must_understand, string actor, bool relay)
+               public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
+                                                  bool mustUnderstand, string actor, bool relay)
                {
                        // FIXME: how to get IsReferenceParameter ?
-                       return new DefaultMessageHeader (name, ns, value, formatter, default_is_ref, must_understand, actor, relay);
+                       return new DefaultMessageHeader (name, ns, value, serializer, default_is_ref, mustUnderstand, actor, relay);
                }
 
-               public virtual bool IsMessageVersionSupported (MessageVersion version)
+               public virtual bool IsMessageVersionSupported (MessageVersion messageVersion)
                {
-                       if (version.Envelope == EnvelopeVersion.Soap12)
+                       if (messageVersion.Envelope == EnvelopeVersion.Soap12)
                                if (Actor == EnvelopeVersion.Soap11.NextDestinationActorValue)
                                        return false;
 
-                       if (version.Envelope == EnvelopeVersion.Soap11)
+                       if (messageVersion.Envelope == EnvelopeVersion.Soap11)
                                if (Actor == EnvelopeVersion.Soap12.NextDestinationActorValue ||
                                    Actor == EnvelopeVersion.Soap12UltimateReceiver)
                                        return false;
@@ -117,9 +117,9 @@ namespace System.ServiceModel.Channels
                        return true;
                }
 
-               protected abstract void OnWriteHeaderContents (XmlDictionaryWriter writer, MessageVersion version);
+               protected abstract void OnWriteHeaderContents (XmlDictionaryWriter writer, MessageVersion messageVersion);
 
-               protected virtual void OnWriteStartHeader (XmlDictionaryWriter writer, MessageVersion version)
+               protected virtual void OnWriteStartHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
                {
                        var dic = Constants.SoapDictionary;
                        XmlDictionaryString name, ns;
@@ -128,7 +128,7 @@ namespace System.ServiceModel.Channels
                                writer.WriteStartElement (prefix, name, ns);
                        else
                                writer.WriteStartElement (prefix, this.Name, this.Namespace);
-                       WriteHeaderAttributes (writer, version);
+                       WriteHeaderAttributes (writer, messageVersion);
                }
 
                public override string ToString ()
@@ -143,58 +143,58 @@ namespace System.ServiceModel.Channels
                        return sb.ToString ();
                }
 
-               public void WriteHeader (XmlDictionaryWriter writer, MessageVersion version)
+               public void WriteHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
                {
                        if (writer == null)
                                throw new ArgumentNullException ("writer is null.");
 
-                       if (version == null)
-                               throw new ArgumentNullException ("version is null.");
+                       if (messageVersion == null)
+                               throw new ArgumentNullException ("messageVersion is null.");
 
-                       if (version.Envelope == EnvelopeVersion.None)
+                       if (messageVersion.Envelope == EnvelopeVersion.None)
                                return;
 
-                       WriteStartHeader (writer, version);
-                       WriteHeaderContents (writer, version);
+                       WriteStartHeader (writer, messageVersion);
+                       WriteHeaderContents (writer, messageVersion);
 
                        writer.WriteEndElement ();
                }
 
-               public void WriteHeader (XmlWriter writer, MessageVersion version)
+               public void WriteHeader (XmlWriter writer, MessageVersion messageVersion)
                {
-                       WriteHeader (XmlDictionaryWriter.CreateDictionaryWriter (writer), version);
+                       WriteHeader (XmlDictionaryWriter.CreateDictionaryWriter (writer), messageVersion);
                }
 
-               protected void WriteHeaderAttributes (XmlDictionaryWriter writer, MessageVersion version)
+               protected void WriteHeaderAttributes (XmlDictionaryWriter writer, MessageVersion messageVersion)
                {
                        var dic = Constants.SoapDictionary;
                        if (Id != null)
                                writer.WriteAttributeString ("u", dic.Add ("Id"), dic.Add (Constants.WsuNamespace), Id);
                        if (!String.IsNullOrEmpty (Actor)) {
-                               if (version.Envelope == EnvelopeVersion.Soap11) 
-                                       writer.WriteAttributeString ("s", dic.Add ("actor"), dic.Add (version.Envelope.Namespace), Actor);
+                               if (messageVersion.Envelope == EnvelopeVersion.Soap11) 
+                                       writer.WriteAttributeString ("s", dic.Add ("actor"), dic.Add (messageVersion.Envelope.Namespace), Actor);
 
-                               if (version.Envelope == EnvelopeVersion.Soap12) 
-                                       writer.WriteAttributeString ("s", dic.Add ("role"), dic.Add (version.Envelope.Namespace), Actor);
+                               if (messageVersion.Envelope == EnvelopeVersion.Soap12) 
+                                       writer.WriteAttributeString ("s", dic.Add ("role"), dic.Add (messageVersion.Envelope.Namespace), Actor);
                        }
 
                        // mustUnderstand is the same across SOAP 1.1 and 1.2
                        if (MustUnderstand == true)
-                               writer.WriteAttributeString ("s", dic.Add ("mustUnderstand"), dic.Add (version.Envelope.Namespace), "1");
+                               writer.WriteAttributeString ("s", dic.Add ("mustUnderstand"), dic.Add (messageVersion.Envelope.Namespace), "1");
 
                        // relay is only available on SOAP 1.2
-                       if (Relay == true && version.Envelope == EnvelopeVersion.Soap12)
-                               writer.WriteAttributeString ("s", dic.Add ("relay"), dic.Add (version.Envelope.Namespace), "true");
+                       if (Relay == true && messageVersion.Envelope == EnvelopeVersion.Soap12)
+                               writer.WriteAttributeString ("s", dic.Add ("relay"), dic.Add (messageVersion.Envelope.Namespace), "true");
                }
 
-               public void WriteHeaderContents (XmlDictionaryWriter writer, MessageVersion version)
+               public void WriteHeaderContents (XmlDictionaryWriter writer, MessageVersion messageVersion)
                {
-                       this.OnWriteHeaderContents (writer, version);
+                       this.OnWriteHeaderContents (writer, messageVersion);
                }
 
-               public void WriteStartHeader (XmlDictionaryWriter writer, MessageVersion version)
+               public void WriteStartHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
                {
-                       this.OnWriteStartHeader (writer, version);
+                       this.OnWriteStartHeader (writer, messageVersion);
                }
 
                public override string Actor { get { return default_actor; }}
index fc4a8e139a1f6a933e750c2e87ee12226ac6df49..c08ef8697dd13e5cba749f5e94fc573d69450439 100644 (file)
@@ -72,9 +72,9 @@ namespace System.ServiceModel.Channels
                        l.Add (header);
                }
 
-               public void CopyHeaderFrom (Message m, int index)
+               public void CopyHeaderFrom (Message message, int headerIndex)
                {
-                       CopyHeaderFrom (m.Headers, index);
+                       CopyHeaderFrom (message.Headers, headerIndex);
                }
 
                public void Clear ()
@@ -82,25 +82,25 @@ namespace System.ServiceModel.Channels
                        l.Clear ();
                }
 
-               public void CopyHeaderFrom (MessageHeaders headers, int index)
+               public void CopyHeaderFrom (MessageHeaders collection, int headerIndex)
                {
-                       l.Add (headers [index]);
+                       l.Add (collection [headerIndex]);
                }
 
-               public void CopyHeadersFrom (Message m)
+               public void CopyHeadersFrom (Message message)
                {
-                       CopyHeadersFrom (m.Headers);
+                       CopyHeadersFrom (message.Headers);
                }
 
-               public void CopyHeadersFrom (MessageHeaders headers)
+               public void CopyHeadersFrom (MessageHeaders collection)
                {
-                       foreach (MessageHeaderInfo h in headers)
+                       foreach (MessageHeaderInfo h in collection)
                                l.Add (h);
                }
 
-               public void CopyTo (MessageHeaderInfo [] dst, int index)
+               public void CopyTo (MessageHeaderInfo [] array, int index)
                {
-                       l.CopyTo (dst, index);
+                       l.CopyTo (array, index);
                }
 
                public int FindHeader (string name, string ns)
@@ -203,11 +203,11 @@ namespace System.ServiceModel.Channels
                        return GetHeader<T> (idx, serializer);
                }
 
-               public XmlDictionaryReader GetReaderAtHeader (int index)
+               public XmlDictionaryReader GetReaderAtHeader (int headerIndex)
                {
-                       if (index >= l.Count)
-                               throw new ArgumentOutOfRangeException (String.Format ("Index is out of range. Current header count is {0}", index));
-                       MessageHeader item = (MessageHeader) l [index];
+                       if (headerIndex >= l.Count)
+                               throw new ArgumentOutOfRangeException (String.Format ("Index is out of range. Current header count is {0}", l.Count));
+                       MessageHeader item = (MessageHeader) l [headerIndex];
 
                        XmlReader reader =
                                item is MessageHeader.XmlMessageHeader ?
@@ -231,9 +231,9 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
-               public void Insert (int index, MessageHeader header)
+               public void Insert (int headerIndex, MessageHeader header)
                {
-                       l.Insert (index, header);
+                       l.Insert (headerIndex, header);
                }
 
                public void RemoveAll (string name, string ns)
@@ -251,9 +251,9 @@ namespace System.ServiceModel.Channels
                                l.RemoveAt (l.Count - 1);
                }
 
-               public void RemoveAt (int index)
+               public void RemoveAt (int headerIndex)
                {
-                       l.RemoveAt (index);
+                       l.RemoveAt (headerIndex);
                }
 
                IEnumerator IEnumerable.GetEnumerator ()
@@ -261,48 +261,48 @@ namespace System.ServiceModel.Channels
                        return ((IEnumerable) l).GetEnumerator ();
                }
 
-               public void WriteHeader (int index, XmlDictionaryWriter writer)
+               public void WriteHeader (int headerIndex, XmlDictionaryWriter writer)
                {
                        if (version.Envelope == EnvelopeVersion.None)
                                return;
-                       WriteStartHeader (index, writer);
-                       WriteHeaderContents (index, writer);
+                       WriteStartHeader (headerIndex, writer);
+                       WriteHeaderContents (headerIndex, writer);
                        writer.WriteEndElement ();
                }
 
-               public void WriteHeader (int index, XmlWriter writer)
+               public void WriteHeader (int headerIndex, XmlWriter writer)
                {
-                       WriteHeader (index, XmlDictionaryWriter.CreateDictionaryWriter (writer));
+                       WriteHeader (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
                }
 
-               public void WriteHeaderContents (int index, XmlDictionaryWriter writer)
+               public void WriteHeaderContents (int headerIndex, XmlDictionaryWriter writer)
                {
-                       if (index > l.Count)
-                               throw new ArgumentOutOfRangeException ("There is no header at position " + index + ".");
+                       if (headerIndex > l.Count)
+                               throw new ArgumentOutOfRangeException ("There is no header at position " + headerIndex + ".");
                        
-                       MessageHeader h = l [index] as MessageHeader;
+                       MessageHeader h = l [headerIndex] as MessageHeader;
 
                        h.WriteHeaderContents (writer, version);
                }
 
-               public void WriteHeaderContents (int index, XmlWriter writer)
+               public void WriteHeaderContents (int headerIndex, XmlWriter writer)
                {
-                       WriteHeaderContents (index, XmlDictionaryWriter.CreateDictionaryWriter (writer));
+                       WriteHeaderContents (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
                }
 
-               public void WriteStartHeader (int index, XmlDictionaryWriter writer)
+               public void WriteStartHeader (int headerIndex, XmlDictionaryWriter writer)
                {
-                       if (index > l.Count)
-                               throw new ArgumentOutOfRangeException ("There is no header at position " + index + ".");
+                       if (headerIndex > l.Count)
+                               throw new ArgumentOutOfRangeException ("There is no header at position " + headerIndex + ".");
 
-                       MessageHeader h = l [index] as MessageHeader;
+                       MessageHeader h = l [headerIndex] as MessageHeader;
                        
                        h.WriteStartHeader (writer, version);
                }
 
-               public void WriteStartHeader (int index, XmlWriter writer)
+               public void WriteStartHeader (int headerIndex, XmlWriter writer)
                {
-                       WriteStartHeader (index, XmlDictionaryWriter.CreateDictionaryWriter (writer));
+                       WriteStartHeader (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
                }
 
                public string Action {
index f79b9e94c42f61c06a329b5385b6ede9a58bfd69..27f3ea130c75f2a4ab2ca895296566373566889e 100644 (file)
@@ -53,36 +53,36 @@ namespace System.ServiceModel.Channels {
                        this.addressing = addressing;
                }
                
-               public static MessageVersion CreateVersion (EnvelopeVersion envelope_version)
+               public static MessageVersion CreateVersion (EnvelopeVersion envelopeVersion)
                {
-                       return CreateVersion (envelope_version,
+                       return CreateVersion (envelopeVersion,
                                AddressingVersion.WSAddressing10);
                }
 
-               public static MessageVersion CreateVersion (EnvelopeVersion envelope_version,
-                                                           AddressingVersion addressing_version)
+               public static MessageVersion CreateVersion (EnvelopeVersion envelopeVersion,
+                                                           AddressingVersion addressingVersion)
                {
-                       if (envelope_version == EnvelopeVersion.None && addressing_version == AddressingVersion.None)
+                       if (envelopeVersion == EnvelopeVersion.None && addressingVersion == AddressingVersion.None)
                                return None;
-                       if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.None)
+                       if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.None)
                                return Soap11;
-                       if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.WSAddressing10)
+                       if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.WSAddressing10)
                                return Soap12WSAddressing10;
 
-                       if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.None)
+                       if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.None)
                                return Soap12;
-                       if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.WSAddressing10)
+                       if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.WSAddressing10)
                                return Soap11WSAddressing10;
-                       if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.WSAddressingAugust2004)
+                       if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.WSAddressingAugust2004)
                                return Soap11WSAddressingAugust2004;
-                       if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.WSAddressingAugust2004)
+                       if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.WSAddressingAugust2004)
                                return Soap12WSAddressingAugust2004;
-                       throw new ArgumentException (string.Format ("EnvelopeVersion {0} cannot be used with AddressingVersion {1}", envelope_version, addressing_version));
+                       throw new ArgumentException (string.Format ("EnvelopeVersion {0} cannot be used with AddressingVersion {1}", envelopeVersion, addressingVersion));
                }
 
-               public override bool Equals (object value)
+               public override bool Equals (object obj)
                {
-                       MessageVersion other = value as MessageVersion;
+                       MessageVersion other = obj as MessageVersion;
 
                        if (other == null)
                                return false;
index ae23b3e3336f50c4c44411d98975dd19faf3c1eb..ffcc6110be6b8219fe27b0aa7131899ebb060e9a 100644 (file)
@@ -531,29 +531,29 @@ namespace System.ServiceModel.Channels
 #endif
 
                public static SecurityBindingElement 
-                       CreateSecureConversationBindingElement (SecurityBindingElement binding)
+                       CreateSecureConversationBindingElement (SecurityBindingElement bootstrapSecurity)
                {
-                       return CreateSecureConversationBindingElement (binding, false);
+                       return CreateSecureConversationBindingElement (bootstrapSecurity, false);
                }
 
                public static SecurityBindingElement 
                        CreateSecureConversationBindingElement (
-                       SecurityBindingElement binding, bool requireCancellation)
+                       SecurityBindingElement bootstrapSecurity, bool requireCancellation)
                {
-                       return CreateSecureConversationBindingElement (binding, requireCancellation, null);
+                       return CreateSecureConversationBindingElement (bootstrapSecurity, requireCancellation, null);
                }
 
                public static SecurityBindingElement 
                        CreateSecureConversationBindingElement (
-                       SecurityBindingElement binding, bool requireCancellation,
-                       ChannelProtectionRequirements protectionRequirements)
+                       SecurityBindingElement bootstrapSecurity, bool requireCancellation,
+                       ChannelProtectionRequirements bootstrapProtectionRequirements)
                {
 #if !MOBILE && !XAMMAC_4_5
                        SymmetricSecurityBindingElement be =
                                new SymmetricSecurityBindingElement ();
                        be.ProtectionTokenParameters =
                                new SecureConversationSecurityTokenParameters (
-                                       binding, requireCancellation, protectionRequirements);
+                                       bootstrapSecurity, requireCancellation, bootstrapProtectionRequirements);
                        return be;
 #else
                        throw new NotImplementedException ();
index ae823e534ebd876c8672cf0708f3f2e2891886d6..e80c26c308fb39add3bfc8cd976478705923824f 100644 (file)
@@ -53,12 +53,12 @@ namespace System.ServiceModel.Channels
                }
 
                protected TcpTransportBindingElement (
-                       TcpTransportBindingElement other)
-                       : base (other)
+                       TcpTransportBindingElement elementToBeCloned)
+                       : base (elementToBeCloned)
                {
-                       listen_backlog = other.listen_backlog;
-                       port_sharing_enabled = other.port_sharing_enabled;
-                       pool.CopyPropertiesFrom (other.pool);
+                       listen_backlog = elementToBeCloned.listen_backlog;
+                       port_sharing_enabled = elementToBeCloned.port_sharing_enabled;
+                       pool.CopyPropertiesFrom (elementToBeCloned.pool);
                }
                
                public TcpConnectionPoolSettings ConnectionPoolSettings {
index deb4b4b49f5d28010a7de6eadcdb9edc65477eac..17f3a1c36d098b5a51cc2a79a544469502f4943e 100644 (file)
@@ -48,12 +48,12 @@ namespace System.ServiceModel.Channels
                }
 
                protected TransportBindingElement (
-                       TransportBindingElement other)
-                       : base (other)
+                       TransportBindingElement elementToBeCloned)
+                       : base (elementToBeCloned)
                {
-                       manual_addressing = other.manual_addressing;
-                       max_buffer_pool_size = other.max_buffer_pool_size;
-                       max_recv_message_size = other.max_recv_message_size;
+                       manual_addressing = elementToBeCloned.manual_addressing;
+                       max_buffer_pool_size = elementToBeCloned.max_buffer_pool_size;
+                       max_recv_message_size = elementToBeCloned.max_recv_message_size;
                }
 
                public virtual bool ManualAddressing {
index 4314c221857dbd41ee6dbd70cbdd1e00b6d785ee..db06df4e288e2f4718b7732662fb7101be641c3d 100644 (file)
@@ -51,17 +51,17 @@ namespace System.ServiceModel.Description
                }
 
                [MonoTODO]
-               protected ClientCredentials (ClientCredentials source)
+               protected ClientCredentials (ClientCredentials other)
                {
-                       userpass = source.userpass.Clone ();
-                       digest = source.digest.Clone ();
-                       initiator = source.initiator.Clone ();
-                       recipient = source.recipient.Clone ();
-                       windows = source.windows.Clone ();
+                       userpass = other.userpass.Clone ();
+                       digest = other.digest.Clone ();
+                       initiator = other.initiator.Clone ();
+                       recipient = other.recipient.Clone ();
+                       windows = other.windows.Clone ();
 #if !MOBILE
-                       issued_token = source.issued_token.Clone ();
-                       peer = source.peer.Clone ();
-                       support_interactive = source.support_interactive;
+                       issued_token = other.issued_token.Clone ();
+                       peer = other.peer.Clone ();
+                       support_interactive = other.support_interactive;
 #endif
                }
 
@@ -159,10 +159,10 @@ namespace System.ServiceModel.Description
 
                [MonoTODO]
                public virtual void ApplyClientBehavior (
-                       ServiceEndpoint endpoint, ClientRuntime behavior)
+                       ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
                {
-                       if (endpoint == null)
-                               throw new ArgumentNullException ("endpoint");
+                       if (serviceEndpoint == null)
+                               throw new ArgumentNullException ("serviceEndpoint");
                        if (behavior == null)
                                throw new ArgumentNullException ("behavior");
 
index 9d12a23d4d2fb12f8c595c6678260f85a6d1b105..08327a5b50d6aeb2ca769534ff9a134790921dff 100644 (file)
@@ -35,22 +35,22 @@ namespace System.ServiceModel.Description
        public interface IContractBehavior
        {
                void AddBindingParameters (
-                       ContractDescription description,
+                       ContractDescription contractDescription,
                        ServiceEndpoint endpoint,
-                       BindingParameterCollection parameters);
+                       BindingParameterCollection bindingParameters);
 
                void ApplyClientBehavior (
-                       ContractDescription description,
+                       ContractDescription contractDescription,
                        ServiceEndpoint endpoint,
-                       ClientRuntime proxy);
+                       ClientRuntime clientRuntime);
 
                void ApplyDispatchBehavior (
-                       ContractDescription description,
+                       ContractDescription contractDescription,
                        ServiceEndpoint endpoint,
-                       DispatchRuntime dispatch);
+                       DispatchRuntime dispatchRuntime);
 
                void Validate (
-                       ContractDescription description,
+                       ContractDescription contractDescription,
                        ServiceEndpoint endpoint);
        }
 }
index 6eb47ec704580f8fb51f04d8a5ae42bc853ad216..773d2676dabe9cadae5e95ae7f8480c52bf13b84 100644 (file)
@@ -34,11 +34,11 @@ namespace System.ServiceModel.Description
        public interface IEndpointBehavior
        {
                void AddBindingParameters (ServiceEndpoint endpoint,
-                       BindingParameterCollection parameters);
-               void ApplyDispatchBehavior (ServiceEndpoint serviceEndpoint,
-                       EndpointDispatcher dispatcher);
-               void ApplyClientBehavior (ServiceEndpoint serviceEndpoint,
-                       ClientRuntime behavior);
-               void Validate (ServiceEndpoint serviceEndpoint);
+                       BindingParameterCollection bindingParameters);
+               void ApplyDispatchBehavior (ServiceEndpoint endpoint,
+                       EndpointDispatcher endpointDispatcher);
+               void ApplyClientBehavior (ServiceEndpoint endpoint,
+                       ClientRuntime clientRuntime);
+               void Validate (ServiceEndpoint endpoint);
        }
 }
index aa67812dfe50beddf7019f178cf4c51a0b017be1..5c887c122bea2aa77ab241f6b8122b7359b17145 100644 (file)
@@ -34,18 +34,18 @@ namespace System.ServiceModel.Description
        public interface IOperationBehavior
        {
                void AddBindingParameters (
-                       OperationDescription description,
-                       BindingParameterCollection parameters);
+                       OperationDescription operationDescription,
+                       BindingParameterCollection bindingParameters);
 
                void ApplyDispatchBehavior (
-                       OperationDescription description,
-                       DispatchOperation dispatch);
+                       OperationDescription operationDescription,
+                       DispatchOperation dispatchOperation);
 
                void ApplyClientBehavior (
-                       OperationDescription description,
-                       ClientOperation proxy);
+                       OperationDescription operationDescription,
+                       ClientOperation clientOperation);
 
                void Validate (
-                       OperationDescription description);
+                       OperationDescription operationDescription);
        }
 }
index 7c0afae785c632047907df2567ea18f4df6c9ac2..ddf9735e5dbbacd0d91f448d705768dd821cf0e2 100644 (file)
@@ -31,7 +31,7 @@ namespace System.ServiceModel.Dispatcher
 {
        public interface IClientMessageFormatter
        {
-               object DeserializeReply (Message message, object [] paremeters);
-               Message SerializeRequest (MessageVersion version, object [] inputs);
+               object DeserializeReply (Message message, object [] parameters);
+               Message SerializeRequest (MessageVersion messageVersion, object [] parameters);
        }
 }
index 5e331a0bd60cafab27689b7a8b395d3b3d9fe7ff..f1eb699517880beae462e99735d8179576ad1362 100644 (file)
@@ -31,7 +31,7 @@ namespace System.ServiceModel.Dispatcher
 {
        public interface IClientMessageInspector
        {
-               void AfterReceiveReply (ref Message message, object correlationState);
-               object BeforeSendRequest (ref Message message, IClientChannel channel);
+               void AfterReceiveReply (ref Message reply, object correlationState);
+               object BeforeSendRequest (ref Message request, IClientChannel channel);
        }
 }
index 3d8e71035a0f6c3a1bff8dd34dc527866e2b3131..41a1376f053884266ff70be148235365855c5d36 100644 (file)
@@ -75,30 +75,30 @@ namespace System.ServiceModel.Security.Tokens
                }
 
                public SecureConversationSecurityTokenParameters (
-                       SecurityBindingElement element)
-                       : this (element, true)
+                       SecurityBindingElement bootstrapSecurityBindingElement)
+                       : this (bootstrapSecurityBindingElement, true)
                {
                }
 
                public SecureConversationSecurityTokenParameters (
-                       SecurityBindingElement element,
+                       SecurityBindingElement bootstrapSecurityBindingElement,
                        bool requireCancellation)
-                       : this (element, requireCancellation, null)
+                       : this (bootstrapSecurityBindingElement, requireCancellation, null)
                {
                }
 
 #if !MOBILE && !XAMMAC_4_5
                public SecureConversationSecurityTokenParameters (
-                       SecurityBindingElement element,
+                       SecurityBindingElement bootstrapSecurityBindingElement,
                        bool requireCancellation,
-                       ChannelProtectionRequirements requirements)
+                       ChannelProtectionRequirements bootstrapProtectionRequirements)
                {
-                       this.element = element;
+                       this.element = bootstrapSecurityBindingElement;
                        this.cancellable = requireCancellation;
-                       if (requirements == null)
+                       if (bootstrapProtectionRequirements == null)
                                this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
                        else
-                               this.requirements = new ChannelProtectionRequirements (requirements);
+                               this.requirements = new ChannelProtectionRequirements (bootstrapProtectionRequirements);
                }
 #else
                internal SecureConversationSecurityTokenParameters (
index bd2b762d9473c68ccd3cdd9fc9f33d4b49d0281c..5b558599b08a5ed866d820a3a2a947a14bc6f7f6 100644 (file)
@@ -35,8 +35,8 @@ namespace System.ServiceModel
        public class ActionNotSupportedException : CommunicationException
        {
                public ActionNotSupportedException () : base () {}
-               public ActionNotSupportedException (string msg) : base (msg) {}
-               public ActionNotSupportedException (string msg, Exception inner) : base (msg, inner) {}
+               public ActionNotSupportedException (string message) : base (message) {}
+               public ActionNotSupportedException (string message, Exception innerException) : base (message, innerException) {}
                protected ActionNotSupportedException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index 732a51022992a0a1e39175fe61a8555583908149..84b8f96db81167bdaab35788a4e94545208a1d82 100644 (file)
@@ -85,9 +85,9 @@ namespace System.ServiceModel
                        get { return Endpoint.Binding.OpenTimeout; }
                }
 
-               protected virtual void ApplyConfiguration (string endpointConfig)
+               protected virtual void ApplyConfiguration (string configurationName)
                {
-                       if (endpointConfig == null)
+                       if (configurationName == null)
                                return;
 
 #if MOBILE || XAMMAC_4_5
@@ -96,22 +96,22 @@ namespace System.ServiceModel
                                var cfg = new SilverlightClientConfigLoader ().Load (XmlReader.Create ("ServiceReferences.ClientConfig"));
 
                                SilverlightClientConfigLoader.ServiceEndpointConfiguration se = null;
-                               if (endpointConfig == "*")
+                               if (configurationName == "*")
                                        se = cfg.GetServiceEndpointConfiguration (Endpoint.Contract.Name);
                                if (se == null)
-                                       se = cfg.GetServiceEndpointConfiguration (endpointConfig);
+                                       se = cfg.GetServiceEndpointConfiguration (configurationName);
 
                                if (se.Binding != null && Endpoint.Binding == null)
                                        Endpoint.Binding = se.Binding;
                                else // ignore it
-                                       Console.WriteLine ("WARNING: Configured binding not found in configuration {0}", endpointConfig);
+                                       Console.WriteLine ("WARNING: Configured binding not found in configuration {0}", configurationName);
                                if (se.Address != null && Endpoint.Address == null)
                                        Endpoint.Address = se.Address;
                                else // ignore it
-                                       Console.WriteLine ("WARNING: Configured endpoint address not found in configuration {0}", endpointConfig);
+                                       Console.WriteLine ("WARNING: Configured endpoint address not found in configuration {0}", configurationName);
                        } catch (Exception) {
                                // ignore it.
-                               Console.WriteLine ("WARNING: failed to load endpoint configuration for {0}", endpointConfig);
+                               Console.WriteLine ("WARNING: failed to load endpoint configuration for {0}", configurationName);
                        }
 #else
 
@@ -120,7 +120,7 @@ namespace System.ServiceModel
                        ChannelEndpointElement endpoint = null;
 
                        foreach (ChannelEndpointElement el in client.Endpoints) {
-                               if (el.Contract == contractName && (endpointConfig == el.Name || endpointConfig == "*")) {
+                               if (el.Contract == contractName && (configurationName == el.Name || configurationName == "*")) {
                                        if (endpoint != null)
                                                throw new InvalidOperationException (String.Format ("More then one endpoint matching contract {0} was found.", contractName));
                                        endpoint = el;
@@ -128,7 +128,7 @@ namespace System.ServiceModel
                        }
 
                        if (endpoint == null)
-                               throw new InvalidOperationException (String.Format ("Client endpoint configuration '{0}' was not found in {1} endpoints.", endpointConfig, client.Endpoints.Count));
+                               throw new InvalidOperationException (String.Format ("Client endpoint configuration '{0}' was not found in {1} endpoints.", configurationName, client.Endpoints.Count));
 
                        var binding = String.IsNullOrEmpty (endpoint.Binding) ? null : ConfigUtil.CreateBinding (endpoint.Binding, endpoint.BindingConfiguration);
                        var contractType = ConfigUtil.GetTypeFromConfigString (endpoint.Contract, NamedConfigCategory.Contract);
@@ -298,23 +298,23 @@ namespace System.ServiceModel
                }
 
                protected void InitializeEndpoint (
-                       string endpointConfigurationName,
+                       string configurationName,
                        EndpointAddress remoteAddress)
                {
                        InitializeEndpoint (CreateDescription ());
                        if (remoteAddress != null)
                                service_endpoint.Address = remoteAddress;
-                       ApplyConfiguration (endpointConfigurationName);
+                       ApplyConfiguration (configurationName);
                }
 
                protected void InitializeEndpoint (Binding binding,
-                       EndpointAddress remoteAddress)
+                       EndpointAddress address)
                {
                        InitializeEndpoint (CreateDescription ());
                        if (binding != null)
                                service_endpoint.Binding = binding;
-                       if (remoteAddress != null)
-                               service_endpoint.Address = remoteAddress;
+                       if (address != null)
+                               service_endpoint.Address = address;
                }
 
                protected void InitializeEndpoint (ServiceEndpoint endpoint)
index 1af7625027ecea7470b966e0a0c214edbdb31571..0f6560c743f6dec1e8d53e34efbeca3bf3b40dba 100644 (file)
@@ -46,12 +46,12 @@ namespace System.ServiceModel
                {
                }
 
-               protected ChannelFactory (Type type)
+               protected ChannelFactory (Type channelType)
                {
-                       if (type == null)
-                               throw new ArgumentNullException ("type");
-                       if (!type.IsInterface)
-                               throw new InvalidOperationException ("The type argument to the generic ChannelFactory constructor must be an interface type.");
+                       if (channelType == null)
+                               throw new ArgumentNullException ("channelType");
+                       if (!channelType.IsInterface)
+                               throw new InvalidOperationException ("The channelType argument to the generic ChannelFactory constructor must be an interface type.");
 
                        InitializeEndpoint (CreateDescription ());
                }
index a41db9ad05281e5248f4d20f1493d4e3f8c07e63..9acde8e4f9c161f533a3b37c8c361a614ac8dc87 100644 (file)
@@ -34,8 +34,8 @@ namespace System.ServiceModel {
        public class CommunicationException : SystemException
        {
                public CommunicationException () : base () {}
-               public CommunicationException (string msg) : base (msg) {}
-               public CommunicationException (string msg, Exception inner) : base (msg, inner) {}
+               public CommunicationException (string message) : base (message) {}
+               public CommunicationException (string message, Exception innerException) : base (message, innerException) {}
                protected CommunicationException (SerializationInfo info, StreamingContext context)
                        : base (info, context) {}
        }
index 720d23eb9c60b842052935199dcab533ce226fad..57f814c2a93536b654bbe17ff0bc12221d9453d4 100644 (file)
@@ -34,9 +34,9 @@ namespace System.ServiceModel {
        public class CommunicationObjectAbortedException : CommunicationException
        {
                public CommunicationObjectAbortedException () : base () {}
-               public CommunicationObjectAbortedException (string msg) : base (msg) {}
-               public CommunicationObjectAbortedException (string msg, Exception inner)
-                       : base (msg, inner) {}          
+               public CommunicationObjectAbortedException (string message) : base (message) {}
+               public CommunicationObjectAbortedException (string message, Exception innerException)
+                       : base (message, innerException) {}             
                protected CommunicationObjectAbortedException (SerializationInfo info,
                                               StreamingContext context)
                        : base (info, context) {}
index c6fb51ee968da8915ff0e201896721e0f03e208c..6538d6a338923150ce0e060771e9f899de4be6f2 100644 (file)
@@ -34,9 +34,9 @@ namespace System.ServiceModel {
        public class CommunicationObjectFaultedException : CommunicationException
        {
                public CommunicationObjectFaultedException () : base () {}
-               public CommunicationObjectFaultedException (string msg) : base (msg) {}
-               public CommunicationObjectFaultedException (string msg, Exception inner)
-                       : base (msg, inner) {}
+               public CommunicationObjectFaultedException (string message) : base (message) {}
+               public CommunicationObjectFaultedException (string message, Exception innerException)
+                       : base (message, innerException) {}
                protected CommunicationObjectFaultedException (SerializationInfo info, StreamingContext context)
                        : base (info, context) {}
        }
index 9c9b76aec61ac33aae7400c40f01df1c6004c1b3..fb4d18dc563450e5fe7312077c7ad5df1c14c8a5 100644 (file)
@@ -45,12 +45,12 @@ namespace System.ServiceModel
                        Initialize (identity);
                }
 
-               public DnsEndpointIdentity (string dns)
-                       : this (Claim.CreateDnsClaim (dns))
+               public DnsEndpointIdentity (string dnsName)
+                       : this (Claim.CreateDnsClaim (dnsName))
                {
                }
 #else
-               public DnsEndpointIdentity (string dns)
+               public DnsEndpointIdentity (string dnsName)
                {
                        throw new NotImplementedException ();
                }
index f437b1a495b5b43cbabf5fca29b4e8204be77da8..64ce85812b5dabce76d928c81a1a802369c78231 100644 (file)
@@ -34,71 +34,71 @@ namespace System.ServiceModel
 {
        public class DuplexClientBase<TChannel> : ClientBase<TChannel> where TChannel : class
        {
-               protected DuplexClientBase (object instance)
-                       : this (new InstanceContext (instance), (Binding) null, null)
+               protected DuplexClientBase (object callbackInstance)
+                       : this (new InstanceContext (callbackInstance), (Binding) null, null)
                {
                }
 
-               protected DuplexClientBase (object instance,
-                       Binding binding, EndpointAddress address)
-                       : this (new InstanceContext (instance), binding, address)
+               protected DuplexClientBase (object callbackInstance,
+                       Binding binding, EndpointAddress remoteAddress)
+                       : this (new InstanceContext (callbackInstance), binding, remoteAddress)
                {
                }
 
-               protected DuplexClientBase (object instance,
-                       string configurationName)
-                       : this (new InstanceContext (instance), configurationName)
+               protected DuplexClientBase (object callbackInstance,
+                       string endpointConfigurationName)
+                       : this (new InstanceContext (callbackInstance), endpointConfigurationName)
                {
                }
 
-               protected DuplexClientBase (object instance,
-                       string bindingConfigurationName, EndpointAddress address)
-                       : this (new InstanceContext (instance), bindingConfigurationName, address)
+               protected DuplexClientBase (object callbackInstance,
+                       string bindingConfigurationName, EndpointAddress remoteAddress)
+                       : this (new InstanceContext (callbackInstance), bindingConfigurationName, remoteAddress)
                {
                }
 
-               protected DuplexClientBase (object instance,
+               protected DuplexClientBase (object callbackInstance,
                        string endpointConfigurationName, string remoteAddress)
-                       : this (new InstanceContext (instance), endpointConfigurationName, remoteAddress)
+                       : this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
                {
                }
 
-               protected DuplexClientBase (InstanceContext instance)
-                       : base (instance)
+               protected DuplexClientBase (InstanceContext callbackInstance)
+                       : base (callbackInstance)
                {
                }
 
-               protected DuplexClientBase (InstanceContext instance,
-                       Binding binding, EndpointAddress address)
-                       : base (instance, binding, address)
+               protected DuplexClientBase (InstanceContext callbackInstance,
+                       Binding binding, EndpointAddress remoteAddress)
+                       : base (callbackInstance, binding, remoteAddress)
                {
                }
 
-               protected DuplexClientBase (InstanceContext instance,
-                       string configurationName)
-                       : base (instance, configurationName)
+               protected DuplexClientBase (InstanceContext callbackInstance,
+                       string endpointConfigurationName)
+                       : base (callbackInstance, endpointConfigurationName)
                {
                }
 
-               protected DuplexClientBase (InstanceContext instance,
+               protected DuplexClientBase (InstanceContext callbackInstance,
                        string endpointConfigurationName, string remoteAddress)
-                       : base (instance, endpointConfigurationName, remoteAddress)
+                       : base (callbackInstance, endpointConfigurationName, remoteAddress)
                {
                }
 
-               protected DuplexClientBase (InstanceContext instance,
-                       string configurationName, EndpointAddress address)
-                       : base (instance, configurationName, address)
+               protected DuplexClientBase (InstanceContext callbackInstance,
+                       string endpointConfigurationName, EndpointAddress address)
+                       : base (callbackInstance, endpointConfigurationName, address)
                {
                }
 
-               protected DuplexClientBase (object instance, ServiceEndpoint endpoint)
-                       : this (new InstanceContext (instance), endpoint)
+               protected DuplexClientBase (object callbackInstance, ServiceEndpoint endpoint)
+                       : this (new InstanceContext (callbackInstance), endpoint)
                {
                }
 
-               protected DuplexClientBase (InstanceContext instance, ServiceEndpoint endpoint)
-                       : base (instance, endpoint)
+               protected DuplexClientBase (InstanceContext callbackInstance, ServiceEndpoint endpoint)
+                       : base (callbackInstance, endpoint)
                {
                }
 
index 737bad6244d948288fc0c5f6fc1e5dbab0bf658d..1740e4d99066ab81ce59ebfa32cce5e3c797bcfa 100644 (file)
@@ -70,11 +70,11 @@ namespace System.ServiceModel
                {
                }
 
-               public EndpointAddress (Uri uri, params AddressHeader [] headers)
-                       : this (uri, null, new AddressHeaderCollection (headers), null, null) {}
+               public EndpointAddress (Uri uri, params AddressHeader [] addressHeaders)
+                       : this (uri, null, new AddressHeaderCollection (addressHeaders), null, null) {}
 
-               public EndpointAddress (Uri uri, EndpointIdentity identity, params AddressHeader [] headers)
-                       : this (uri, identity, new AddressHeaderCollection (headers), null, null) {}
+               public EndpointAddress (Uri uri, EndpointIdentity identity, params AddressHeader [] addressHeaders)
+                       : this (uri, identity, new AddressHeaderCollection (addressHeaders), null, null) {}
 
                public EndpointAddress (Uri uri, EndpointIdentity identity, AddressHeaderCollection headers)
                        : this (uri, identity, headers, null, null) {}
index a3b644824598d30c3f8db1a4c29a86a43f734d6e..fc44796f7c9d0f93dd332b6f2f295fe01f84ea26 100644 (file)
@@ -34,8 +34,8 @@ namespace System.ServiceModel {
        public class EndpointNotFoundException : CommunicationException
        {
                public EndpointNotFoundException () : base () {}
-               public EndpointNotFoundException (string msg) : base (msg) {}
-               public EndpointNotFoundException (string msg, Exception inner) : base (msg, inner) {}
+               public EndpointNotFoundException (string message) : base (message) {}
+               public EndpointNotFoundException (string message, Exception innerException) : base (message, innerException) {}
                protected EndpointNotFoundException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index c33159baca43a21195cdfa08d0cdff181bc02b3f..a2b47aa4f6a4e482871c79a28a272847e63f002b 100644 (file)
@@ -42,16 +42,16 @@ namespace System.ServiceModel
                {
                }
 
-               public FaultCode (string name, FaultCode subcode)
-                       : this (name, String.Empty, subcode)
+               public FaultCode (string name, FaultCode subCode)
+                       : this (name, String.Empty, subCode)
                {
                }
 
-               public FaultCode (string name, string ns, FaultCode subcode)
+               public FaultCode (string name, string ns, FaultCode subCode)
                {
                        this.name = name;
                        this.ns = ns;
-                       this.subcode = subcode;
+                       this.subcode = subCode;
                }
 
                public bool IsPredefinedFault {
@@ -78,9 +78,9 @@ namespace System.ServiceModel
                        get { return subcode; }
                }
 
-               public static FaultCode CreateReceiverFaultCode (FaultCode subcode)
+               public static FaultCode CreateReceiverFaultCode (FaultCode subCode)
                {
-                       return new FaultCode ("Receiver", subcode);
+                       return new FaultCode ("Receiver", subCode);
                }
 
                public static FaultCode CreateReceiverFaultCode (string name, string ns)
@@ -88,9 +88,9 @@ namespace System.ServiceModel
                        return CreateReceiverFaultCode (new FaultCode (name, ns));
                }
                
-               public static FaultCode CreateSenderFaultCode (FaultCode subcode)
+               public static FaultCode CreateSenderFaultCode (FaultCode subCode)
                {
-                       return new FaultCode ("Sender", subcode);
+                       return new FaultCode ("Sender", subCode);
                }
 
                public static FaultCode CreateSenderFaultCode (string name, string ns)
index 5e06e2f1287096be96fa594acaf68f370f43c00b..05b3af01caf8117bb1e39b4eae01a04e70323469 100644 (file)
@@ -100,7 +100,7 @@ namespace System.ServiceModel
                }
 
                [MonoTODO]
-               public static FaultException CreateFault (MessageFault fault,  params Type [] details)
+               public static FaultException CreateFault (MessageFault messageFault,  params Type [] faultDetailTypes)
                {
                        throw new NotImplementedException ();
                }
index fe787f2312950d03954a452f7705fa63b8b93786..eb0f348ffdbbcc036bca0812ef22c152694c9a72 100644 (file)
@@ -34,8 +34,8 @@ namespace System.ServiceModel {
        public class InvalidMessageContractException : SystemException
        {
                public InvalidMessageContractException () : base () {}
-               public InvalidMessageContractException (string msg) : base (msg) {}
-               public InvalidMessageContractException (string msg, Exception inner) : base (msg, inner) {}
+               public InvalidMessageContractException (string message) : base (message) {}
+               public InvalidMessageContractException (string message, Exception innerException) : base (message, innerException) {}
                protected InvalidMessageContractException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index b47c54750f5cefe905cb954958bf4e4e0e4f5db7..376c3861ad12887081c0db2a5f8be274bd7fda8a 100644 (file)
@@ -35,8 +35,8 @@ namespace System.ServiceModel {
        public class MessageHeaderException : ProtocolException
        {
                public MessageHeaderException () : this ("Message header exception") {}
-               public MessageHeaderException (string msg) : this (msg, null) {}
-               public MessageHeaderException (string msg, Exception inner) : base (msg, inner) {}
+               public MessageHeaderException (string message) : this (message, null) {}
+               public MessageHeaderException (string message, Exception innerException) : base (message, innerException) {}
                protected MessageHeaderException (SerializationInfo info, StreamingContext context) :
                        base (info, context)
                {
index 04814785c61ba95cfe1be7ccc63456fb658038c1..e6d17aab279782f73799da0573c5c36337057438 100644 (file)
@@ -53,10 +53,10 @@ namespace System.ServiceModel
                {
                }
 
-               public MessageHeader (T content, bool must_understand, string actor, bool relay)
+               public MessageHeader (T content, bool mustUnderstand, string actor, bool relay)
                {
                        this.content = content;
-                       this.must_understand = must_understand;
+                       this.must_understand = mustUnderstand;
                        this.actor = actor;
                        this.relay = relay;
                }
index e2fc290816d06c2b9c9bfca9770aee980eb49526..4a2a89d205777f2dc178410da25623b9eb5f1eec 100644 (file)
@@ -34,9 +34,9 @@ namespace System.ServiceModel {
        public class ProtocolException : CommunicationException
        {
                public ProtocolException () : base () {}
-               public ProtocolException (string msg) : base (msg) {}
-               public ProtocolException (string msg, Exception inner)
-                       : base (msg, inner) {}          
+               public ProtocolException (string message) : base (message) {}
+               public ProtocolException (string message, Exception innerException)
+                       : base (message, innerException) {}             
                protected ProtocolException (SerializationInfo info,
                                          StreamingContext context)
                        : base (info, context) {}
index adf08d2a071072488a85597f224b0a22cc5936f0..0407be88306732fe349607fff9c62162c0480a9b 100644 (file)
@@ -34,9 +34,9 @@ namespace System.ServiceModel {
        public class QuotaExceededException : SystemException
        {
                public QuotaExceededException () : base () {}
-               public QuotaExceededException (string msg) : base (msg) {}
-               public QuotaExceededException (string msg, Exception inner)
-                       : base (msg, inner) {}          
+               public QuotaExceededException (string message) : base (message) {}
+               public QuotaExceededException (string message, Exception innerException)
+                       : base (message, innerException) {}             
                protected QuotaExceededException (SerializationInfo info,
                                               StreamingContext context)
                        : base (info, context) {}
index f38f3125209f24612b966381702b5d35c3004ca1..c96b274e2af3050d17895a7c639cf7d06db913d5 100644 (file)
@@ -34,9 +34,9 @@ namespace System.ServiceModel {
        public class ServerTooBusyException : CommunicationException
        {
                public ServerTooBusyException () : base () {}
-               public ServerTooBusyException (string msg) : base (msg) {}
-               public ServerTooBusyException (string msg, Exception inner)
-                       : base (msg, inner) {}          
+               public ServerTooBusyException (string message) : base (message) {}
+               public ServerTooBusyException (string message, Exception innerException)
+                       : base (message, innerException) {}             
                protected ServerTooBusyException (SerializationInfo info,
                                               StreamingContext context)
                        : base (info, context) {}
index 6fe64902d4ce30ed2ce3013cd2db8740c19748e6..a55841387a817df5fff54780e40bcb701f6ce399 100644 (file)
@@ -34,9 +34,9 @@ namespace System.ServiceModel {
        public class ServiceActivationException : CommunicationException
        {
                public ServiceActivationException () : base () {}
-               public ServiceActivationException (string msg) : base (msg) {}
-               public ServiceActivationException (string msg, Exception inner)
-                       : base (msg, inner) {}          
+               public ServiceActivationException (string message) : base (message) {}
+               public ServiceActivationException (string message, Exception innerException)
+                       : base (message, innerException) {}             
                protected ServiceActivationException (SerializationInfo info,
                                               StreamingContext context)
                        : base (info, context) {}
index 396579fd2555c54aab9803f9eb3b90604c0dd641..4381d758cfc854e047c3baa368ddcf19350da01c 100644 (file)
@@ -45,12 +45,12 @@ namespace System.ServiceModel
                        Initialize (identity);
                }
 
-               public SpnEndpointIdentity (string spn)
-                       : this (Claim.CreateSpnClaim (spn))
+               public SpnEndpointIdentity (string spnName)
+                       : this (Claim.CreateSpnClaim (spnName))
                {
                }
 #else
-               public SpnEndpointIdentity (string spn)
+               public SpnEndpointIdentity (string spnName)
                {
                        throw new NotImplementedException ();
                }
index e53d72009a66a6c7591354242e2b7d8a20997dfb..93863a78e5f54876595ff8535113c2eae8589a6d 100644 (file)
@@ -45,12 +45,12 @@ namespace System.ServiceModel
                        Initialize (identity);
                }
 
-               public UpnEndpointIdentity (string upn)
-                       : this (Claim.CreateUpnClaim (upn))
+               public UpnEndpointIdentity (string upnName)
+                       : this (Claim.CreateUpnClaim (upnName))
                {
                }
 #else
-               public UpnEndpointIdentity (string upn)
+               public UpnEndpointIdentity (string upnName)
                {
                        throw new NotImplementedException ();
                }
index 976dc6728eac0dd5c1b272859bdae78a2a787ecb..f43655c573616811d5c737923109c124ff68edec 100644 (file)
@@ -129,7 +129,6 @@ namespace MonoTests.System.ServiceModel.MetadataTests {
                                AuthenticationSchemes.Ntlm, label);
                }
 
-#if NET_4_5
                [Test]
                public virtual void BasicHttps ()
                {
@@ -179,7 +178,6 @@ namespace MonoTests.System.ServiceModel.MetadataTests {
                                WSMessageEncoding.Text, HttpClientCredentialType.None,
                                AuthenticationSchemes.Anonymous, label);
                }
-#endif
                
                [Test]
                public virtual void NetTcp ()
index e04de3e58968947d49fc44b80ac83be916ae00d4..ab336b3c0500b53f17ba6bcb10a32e67664c140c 100644 (file)
@@ -136,7 +136,6 @@ namespace MonoTests.System.ServiceModel.MetadataTests {
                        return exporter.GetGeneratedMetadata ();
                }
                
-#if NET_4_5
                [MetadataSample]
                public static MetadataSet BasicHttps ()
                {
@@ -197,7 +196,6 @@ namespace MonoTests.System.ServiceModel.MetadataTests {
                        
                        return exporter.GetGeneratedMetadata ();
                }
-#endif
                
                [MetadataSample]
                public static MetadataSet NetTcp ()
index 06ee42a1a11954ad135e2bceda783c3e00a6beec..a88bfa88c0efb44c29e23019914ba4b46a2ee29b 100644 (file)
@@ -169,7 +169,6 @@ namespace MonoTests.System.Web.Security
                        }
                }
 
-#if NET_4_5
                [Test]
                public void Protect ()
                {
@@ -200,6 +199,5 @@ namespace MonoTests.System.Web.Security
                                MachineKey.Unprotect (encryptedBytes, oneUsage), 
                                "Single purpose working when multiple supplied");
                }
-#endif
        }
 }
index 4ace2ca1b3721eb2099edabdd4f8e152cca3d218..b9900b94a5f8cd1594b9ae10604353e075c97144 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_5
 
 using System.ComponentModel.DataAnnotations;
 using System.Linq;
@@ -137,4 +136,3 @@ namespace MonoTests.System.Web.Security {
                }
        }
 }
-#endif
index 9ae8aae05541ffcfd3b32b09fcdde4b773eb7273..192623ce4c4abca6f0289beb257f1f22833f5627 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Threading.Tasks;
@@ -115,4 +114,3 @@ namespace MonoTests.System.Web
        }
 }
 
-#endif
index 50afda19bcb9cc67595c47edda027a42d7467236..bfd5b216249c9ad08bf01758522b4fb4fc712b19 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.IO;
@@ -129,4 +128,3 @@ namespace MonoTests.System.Web
        }
 }
 
-#endif
index 301a2988a3c10309c4ccfb8f74c79524c2ac8e08..05a67e4da0493a6ab3bffc6b9107b1891afcccc6 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Threading;
@@ -331,4 +330,3 @@ namespace MonoTests.System.Web
        }
 }
 
-#endif
index 16c46b496f4ce7a996bdbf568db76d706bd7e52a..26f461aeb30ff94cdb2f6dea7afffb0ae06499e8 100644 (file)
@@ -15,10 +15,8 @@ using System.Text;
 using System.Xml;\r
 using System.Xml.Schema;\r
 using System.Xml.XPath;\r
-#if NET_4_5\r
 using System.Threading;\r
 using System.Threading.Tasks;\r
-#endif\r
 \r
 using NUnit.Framework;\r
 \r
@@ -2298,7 +2296,6 @@ namespace MonoTests.System.Xml
                        Assert.AreEqual ((UInt64) 1, xr.ReadContentAs (typeof (UInt64), null), "#8");\r
                }\r
 \r
-#if NET_4_5\r
                [Test]\r
                [ExpectedException(typeof(InvalidOperationException))]\r
                public void MustSetAsyncFlag ()\r
@@ -2347,6 +2344,5 @@ namespace MonoTests.System.Xml
                        if (task.Result != null)\r
                                throw task.Result;\r
                }\r
-#endif\r
        }\r
 }\r
index effd9df94fe506380243727a24bcdf30a8449e3d..768cd5671dac943f4f59ee39dbed06dedf1daabe 100644 (file)
@@ -419,7 +419,6 @@ namespace MonoTests.System.Xml
                        Assert.AreEqual ("urn:foo", r.BaseURI);
                }
 
-#if NET_4_5
                [Test]
                [ExpectedException (typeof (XmlException))]
                public void ReadonlyAsync ()
@@ -444,6 +443,5 @@ namespace MonoTests.System.Xml
                        var r2 = XmlReader.Create (r, c);
                        Assert.IsTrue (r2.Settings.Async);
                }
-#endif
        }
 }
index df9756ee8f17739f224b7c92ebc770dc481bef09..15b20974487f087fc833d2132fa1c5de6df42d22 100644 (file)
@@ -103,7 +103,6 @@ namespace MonoTests.System.Xml {
                        Assert.IsTrue (u2.IsAbsoluteUri, "null,absolute/file");
                }
 
-#if NET_4_5
                class AsyncXmlResolver : XmlResolver
                {
                        public override object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn)
@@ -121,6 +120,5 @@ namespace MonoTests.System.Xml {
                        var uri = new Uri ("http://www.mono-project.com");
                        ar.GetEntityAsync (uri, null, typeof(string));
                }
-#endif
        }
 }
index 8f2de60a83892664ac61f5cb90d72dc37813427d..493bc6a8ad04504160745edfb05ef59ca5cc06d9 100644 (file)
@@ -124,7 +124,6 @@ namespace MonoTests.System.Xml
                        Assert.IsTrue (site, "Site-2");
                }
 
-#if NET_4_5
                [Test]
                [Category("Async")]
                public void TestAsync ()
@@ -139,7 +138,6 @@ namespace MonoTests.System.Xml
                        Assert.That (task.Wait (3000));
                        Assert.IsInstanceOfType (typeof (Stream), task.Result);
                }
-#endif
 
        }
 }
index e62e8cebad0d717565a4bfb6ae35bd4c28ec7130..f637e8cc326abd7c019506a39af0ed43e59ad850 100644 (file)
@@ -10,9 +10,7 @@ using System;
 using System.IO;\r
 using System.Xml;\r
 using NUnit.Framework;\r
-#if NET_4_5\r
 using System.Reflection;\r
-#endif\r
 \r
 namespace MonoTests.System.Xml\r
 {\r
@@ -98,7 +96,6 @@ namespace MonoTests.System.Xml
                        Assert.AreEqual ("view:Standard.xslt", uri.AbsoluteUri, "#2");\r
                }\r
 \r
-#if NET_4_5\r
                [Test]\r
                public void TestAsync ()\r
                {\r
@@ -126,6 +123,5 @@ namespace MonoTests.System.Xml
                                Assert.IsTrue (ex is XmlException);\r
                        }\r
                }\r
-#endif\r
        }\r
 }\r
index f70d43bd46d6e27ffd6c510d897722d2af9e4e34..3ee725dff252e037feb6f562b65756bf7ee8b961 100644 (file)
@@ -40,9 +40,7 @@ namespace MonoTests.System.Xml
                        Assert.AreEqual (false, s.NewLineOnAttributes);
                        Assert.AreEqual (false, s.OmitXmlDeclaration);
                        Assert.AreEqual (NewLineHandling.Replace, s.NewLineHandling);
-#if NET_4_5
                        Assert.IsFalse (s.Async);
-#endif
                }
 
                [Test]
@@ -381,7 +379,6 @@ namespace MonoTests.System.Xml
                        Assert.AreEqual (xml, sw.ToString ());
                }
 
-#if NET_4_5
                [Test]
                [ExpectedException (typeof (XmlException))]
                public void ReadonlyAsync ()
@@ -408,7 +405,6 @@ namespace MonoTests.System.Xml
                        var w2 = XmlWriter.Create (w, c);
                        Assert.IsTrue (w2.Settings.Async);
                }
-#endif
 
        }
 }
index dc395b7d110e122b8dcf779cc8490f9e24ffb6e7..5415ff8e50a4beb760cc5825406fd6e49e7a3989 100644 (file)
@@ -2084,7 +2084,6 @@ namespace MonoTests.System.Xml.Linq
                        public XElement Content;
                }
 
-#if NET_4_5
                [Test]
                // Bug #12571
                public void DeserializeXElement ()
@@ -2099,7 +2098,6 @@ namespace MonoTests.System.Xml.Linq
                        var xe = (SerializableClass)res;
                        Assert.AreEqual (xe.Content.ToString (), "<Data />", "#3");
                }
-#endif
 
                [Test] // Bug #20151
                public void XElementFromArrayWithNullValuesAsObject ()
index efed94f85503853ebcb46d07f6d5655dda3ffd95..705cd5d0206658a1bb3b900c3e98e4951560ecd5 100644 (file)
@@ -52,13 +52,13 @@ namespace System.IO.Compression
                bool disposed;
                DeflateStreamNative native;
 
-               public DeflateStream (Stream compressedStream, CompressionMode mode) :
-                       this (compressedStream, mode, false, false)
+               public DeflateStream (Stream stream, CompressionMode mode) :
+                       this (stream, mode, false, false)
                {
                }
 
-               public DeflateStream (Stream compressedStream, CompressionMode mode, bool leaveOpen) :
-                       this (compressedStream, mode, leaveOpen, false)
+               public DeflateStream (Stream stream, CompressionMode mode, bool leaveOpen) :
+                       this (stream, mode, leaveOpen, false)
                {
                }
 
@@ -124,23 +124,23 @@ namespace System.IO.Compression
                        }
                }
 
-               public override int Read (byte[] dest, int dest_offset, int count)
+               public override int Read (byte[] array, int offset, int count)
                {
                        if (disposed)
                                throw new ObjectDisposedException (GetType ().FullName);
-                       if (dest == null)
+                       if (array == null)
                                throw new ArgumentNullException ("Destination array is null.");
                        if (!CanRead)
                                throw new InvalidOperationException ("Stream does not support reading.");
-                       int len = dest.Length;
-                       if (dest_offset < 0 || count < 0)
+                       int len = array.Length;
+                       if (offset < 0 || count < 0)
                                throw new ArgumentException ("Dest or count is negative.");
-                       if (dest_offset > len)
+                       if (offset > len)
                                throw new ArgumentException ("destination offset is beyond array size");
-                       if ((dest_offset + count) > len)
+                       if ((offset + count) > len)
                                throw new ArgumentException ("Reading would overrun buffer");
 
-                       return ReadInternal (dest, dest_offset, count);
+                       return ReadInternal (array, offset, count);
                }
 
                unsafe void WriteInternal (byte[] array, int offset, int count)
@@ -154,16 +154,16 @@ namespace System.IO.Compression
                        }
                }
 
-               public override void Write (byte[] src, int src_offset, int count)
+               public override void Write (byte[] array, int offset, int count)
                {
                        if (disposed)
                                throw new ObjectDisposedException (GetType ().FullName);
 
-                       if (src == null)
-                               throw new ArgumentNullException ("src");
+                       if (array == null)
+                               throw new ArgumentNullException ("array");
 
-                       if (src_offset < 0)
-                               throw new ArgumentOutOfRangeException ("src_offset");
+                       if (offset < 0)
+                               throw new ArgumentOutOfRangeException ("offset");
 
                        if (count < 0)
                                throw new ArgumentOutOfRangeException ("count");
@@ -171,10 +171,10 @@ namespace System.IO.Compression
                        if (!CanWrite)
                                throw new NotSupportedException ("Stream does not support writing");
 
-                       if (src_offset > src.Length - count)
+                       if (offset > array.Length - count)
                                throw new ArgumentException ("Buffer too small. count/offset wrong.");
 
-                       WriteInternal (src, src_offset, count);
+                       WriteInternal (array, offset, count);
                }
 
                public override void Flush ()
index 88f774ad099edd5bf6a599438616d72972063f2b..edd8e93a893b77b53c1bdf9403113fe13edfa310 100644 (file)
@@ -70,21 +70,21 @@ namespace System.IO.Compression {
                        base.Dispose (disposing);
                }
 
-               public override int Read (byte[] dest, int dest_offset, int count)
+               public override int Read (byte[] array, int offset, int count)
                {
                        if (deflateStream == null)
                                throw new ObjectDisposedException (GetType ().FullName);
 
-                       return deflateStream.Read(dest, dest_offset, count);
+                       return deflateStream.Read(array, offset, count);
                }
 
 
-               public override void Write (byte[] src, int src_offset, int count)
+               public override void Write (byte[] array, int offset, int count)
                {
                        if (deflateStream == null)
                                throw new ObjectDisposedException (GetType ().FullName);
 
-                       deflateStream.Write (src, src_offset, count);
+                       deflateStream.Write (array, offset, count);
                }
 
                public override void Flush()
index 4bca32b7dccb027bbec28a44c2194f04b7ff0168..d2fa435d45f2be6ef83f95e6632955480085494d 100644 (file)
@@ -811,7 +811,7 @@ namespace System.Net.Sockets
 
 #region Poll
 
-               public bool Poll (int time_us, SelectMode mode)
+               public bool Poll (int microSeconds, SelectMode mode)
                {
                        ThrowIfDisposedAndClosed ();
 
@@ -819,7 +819,7 @@ namespace System.Net.Sockets
                                throw new NotSupportedException ("'mode' parameter is not valid.");
 
                        int error;
-                       bool result = Poll_internal (safe_handle, mode, time_us, out error);
+                       bool result = Poll_internal (safe_handle, mode, microSeconds, out error);
 
                        if (error != 0)
                                throw new SocketException (error);
@@ -1115,27 +1115,27 @@ namespace System.Net.Sockets
 
 #region Bind
 
-               public void Bind (EndPoint local_end)
+               public void Bind (EndPoint localEP)
                {
                        ThrowIfDisposedAndClosed ();
 
-                       if (local_end == null)
-                               throw new ArgumentNullException("local_end");
+                       if (localEP == null)
+                               throw new ArgumentNullException("localEP");
                                
-                       var ipEndPoint = local_end as IPEndPoint;
+                       var ipEndPoint = localEP as IPEndPoint;
                        if (ipEndPoint != null) {
-                               local_end = RemapIPEndPoint (ipEndPoint);       
+                               localEP = RemapIPEndPoint (ipEndPoint); 
                        }
                        
                        int error;
-                       Bind_internal (safe_handle, local_end.Serialize(), out error);
+                       Bind_internal (safe_handle, localEP.Serialize(), out error);
 
                        if (error != 0)
                                throw new SocketException (error);
                        if (error == 0)
                                is_bound = true;
 
-                       seed_endpoint = local_end;
+                       seed_endpoint = localEP;
                }
 
                private static void Bind_internal (SafeSocketHandle safeHandle, SocketAddress sa, out int error)
@@ -1732,14 +1732,14 @@ namespace System.Net.Sockets
                        return Receive (buffer, SocketFlags.None);
                }
 
-               public int Receive (byte [] buffer, SocketFlags flags)
+               public int Receive (byte [] buffer, SocketFlags socketFlags)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, 0, buffer.Length);
 
                        SocketError error;
-                       int ret = Receive_nochecks (buffer, 0, buffer.Length, flags, out error);
+                       int ret = Receive_nochecks (buffer, 0, buffer.Length, socketFlags, out error);
 
                        if (error != SocketError.Success) {
                                if (error == SocketError.WouldBlock && is_blocking) // This might happen when ReceiveTimeout is set
@@ -1750,14 +1750,14 @@ namespace System.Net.Sockets
                        return ret;
                }
 
-               public int Receive (byte [] buffer, int size, SocketFlags flags)
+               public int Receive (byte [] buffer, int size, SocketFlags socketFlags)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, 0, size);
 
                        SocketError error;
-                       int ret = Receive_nochecks (buffer, 0, size, flags, out error);
+                       int ret = Receive_nochecks (buffer, 0, size, socketFlags, out error);
 
                        if (error != SocketError.Success) {
                                if (error == SocketError.WouldBlock && is_blocking) // This might happen when ReceiveTimeout is set
@@ -1768,14 +1768,14 @@ namespace System.Net.Sockets
                        return ret;
                }
 
-               public int Receive (byte [] buffer, int offset, int size, SocketFlags flags)
+               public int Receive (byte [] buffer, int offset, int size, SocketFlags socketFlags)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, offset, size);
 
                        SocketError error;
-                       int ret = Receive_nochecks (buffer, offset, size, flags, out error);
+                       int ret = Receive_nochecks (buffer, offset, size, socketFlags, out error);
 
                        if (error != SocketError.Success) {
                                if (error == SocketError.WouldBlock && is_blocking) // This might happen when ReceiveTimeout is set
@@ -1786,13 +1786,13 @@ namespace System.Net.Sockets
                        return ret;
                }
 
-               public int Receive (byte [] buffer, int offset, int size, SocketFlags flags, out SocketError error)
+               public int Receive (byte [] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, offset, size);
 
-                       return Receive_nochecks (buffer, offset, size, flags, out error);
+                       return Receive_nochecks (buffer, offset, size, socketFlags, out errorCode);
                }
 
                public int Receive (IList<ArraySegment<byte>> buffers)
@@ -2075,24 +2075,24 @@ namespace System.Net.Sockets
                        return ReceiveFrom (buffer, 0, buffer.Length, SocketFlags.None, ref remoteEP);
                }
 
-               public int ReceiveFrom (byte [] buffer, SocketFlags flags, ref EndPoint remoteEP)
+               public int ReceiveFrom (byte [] buffer, SocketFlags socketFlags, ref EndPoint remoteEP)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
 
-                       return ReceiveFrom (buffer, 0, buffer.Length, flags, ref remoteEP);
+                       return ReceiveFrom (buffer, 0, buffer.Length, socketFlags, ref remoteEP);
                }
 
-               public int ReceiveFrom (byte [] buffer, int size, SocketFlags flags, ref EndPoint remoteEP)
+               public int ReceiveFrom (byte [] buffer, int size, SocketFlags socketFlags, ref EndPoint remoteEP)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, 0, size);
 
-                       return ReceiveFrom (buffer, 0, size, flags, ref remoteEP);
+                       return ReceiveFrom (buffer, 0, size, socketFlags, ref remoteEP);
                }
 
-               public int ReceiveFrom (byte [] buffer, int offset, int size, SocketFlags flags, ref EndPoint remoteEP)
+               public int ReceiveFrom (byte [] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
@@ -2102,7 +2102,7 @@ namespace System.Net.Sockets
                                throw new ArgumentNullException ("remoteEP");
 
                        int error;
-                       return ReceiveFrom_nochecks_exc (buffer, offset, size, flags, ref remoteEP, true, out error);
+                       return ReceiveFrom_nochecks_exc (buffer, offset, size, socketFlags, ref remoteEP, true, out error);
                }
 
                public bool ReceiveFromAsync (SocketAsyncEventArgs e)
@@ -2325,14 +2325,14 @@ namespace System.Net.Sockets
                        return ret;
                }
 
-               public int Send (byte [] buffer, SocketFlags flags)
+               public int Send (byte [] buffer, SocketFlags socketFlags)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, 0, buffer.Length);
 
                        SocketError error;
-                       int ret = Send_nochecks (buffer, 0, buffer.Length, flags, out error);
+                       int ret = Send_nochecks (buffer, 0, buffer.Length, socketFlags, out error);
 
                        if (error != SocketError.Success)
                                throw new SocketException ((int) error);
@@ -2340,14 +2340,14 @@ namespace System.Net.Sockets
                        return ret;
                }
 
-               public int Send (byte [] buffer, int size, SocketFlags flags)
+               public int Send (byte [] buffer, int size, SocketFlags socketFlags)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, 0, size);
 
                        SocketError error;
-                       int ret = Send_nochecks (buffer, 0, size, flags, out error);
+                       int ret = Send_nochecks (buffer, 0, size, socketFlags, out error);
 
                        if (error != SocketError.Success)
                                throw new SocketException ((int) error);
@@ -2355,14 +2355,14 @@ namespace System.Net.Sockets
                        return ret;
                }
 
-               public int Send (byte [] buffer, int offset, int size, SocketFlags flags)
+               public int Send (byte [] buffer, int offset, int size, SocketFlags socketFlags)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, offset, size);
 
                        SocketError error;
-                       int ret = Send_nochecks (buffer, offset, size, flags, out error);
+                       int ret = Send_nochecks (buffer, offset, size, socketFlags, out error);
 
                        if (error != SocketError.Success)
                                throw new SocketException ((int) error);
@@ -2370,13 +2370,13 @@ namespace System.Net.Sockets
                        return ret;
                }
 
-               public int Send (byte [] buffer, int offset, int size, SocketFlags flags, out SocketError error)
+               public int Send (byte [] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, offset, size);
 
-                       return Send_nochecks (buffer, offset, size, flags, out error);
+                       return Send_nochecks (buffer, offset, size, socketFlags, out errorCode);
                }
 
                public
@@ -2685,37 +2685,37 @@ namespace System.Net.Sockets
 
 #region SendTo
 
-               public int SendTo (byte [] buffer, EndPoint remote_end)
+               public int SendTo (byte [] buffer, EndPoint remoteEP)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
 
-                       return SendTo (buffer, 0, buffer.Length, SocketFlags.None, remote_end);
+                       return SendTo (buffer, 0, buffer.Length, SocketFlags.None, remoteEP);
                }
 
-               public int SendTo (byte [] buffer, SocketFlags flags, EndPoint remote_end)
+               public int SendTo (byte [] buffer, SocketFlags socketFlags, EndPoint remoteEP)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
 
-                       return SendTo (buffer, 0, buffer.Length, flags, remote_end);
+                       return SendTo (buffer, 0, buffer.Length, socketFlags, remoteEP);
                }
 
-               public int SendTo (byte [] buffer, int size, SocketFlags flags, EndPoint remote_end)
+               public int SendTo (byte [] buffer, int size, SocketFlags socketFlags, EndPoint remoteEP)
                {
-                       return SendTo (buffer, 0, size, flags, remote_end);
+                       return SendTo (buffer, 0, size, socketFlags, remoteEP);
                }
 
-               public int SendTo (byte [] buffer, int offset, int size, SocketFlags flags, EndPoint remote_end)
+               public int SendTo (byte [] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, offset, size);
 
-                       if (remote_end == null)
-                               throw new ArgumentNullException("remote_end");
+                       if (remoteEP == null)
+                               throw new ArgumentNullException("remoteEP");
 
-                       return SendTo_nochecks (buffer, offset, size, flags, remote_end);
+                       return SendTo_nochecks (buffer, offset, size, socketFlags, remoteEP);
                }
 
                public bool SendToAsync (SocketAsyncEventArgs e)
@@ -3027,12 +3027,12 @@ namespace System.Net.Sockets
                                throw new SocketException (error);
                }
 
-               public byte [] GetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, int length)
+               public byte [] GetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, int optionLength)
                {
                        ThrowIfDisposedAndClosed ();
 
                        int error;
-                       byte[] byte_val = new byte [length];
+                       byte[] byte_val = new byte [optionLength];
                        GetSocketOption_arr_internal (safe_handle, optionLevel, optionName, ref byte_val, out error);
 
                        if (error != 0)
@@ -3193,13 +3193,13 @@ namespace System.Net.Sockets
 
 #region IOControl
 
-               public int IOControl (int ioctl_code, byte [] in_value, byte [] out_value)
+               public int IOControl (int ioControlCode, byte [] optionInValue, byte [] optionOutValue)
                {
                        if (is_disposed)
                                throw new ObjectDisposedException (GetType ().ToString ());
 
                        int error;
-                       int result = IOControl_internal (safe_handle, ioctl_code, in_value, out_value, out error);
+                       int result = IOControl_internal (safe_handle, ioControlCode, optionInValue, optionOutValue, out error);
 
                        if (error != 0)
                                throw new SocketException (error);
index 97b7b1c70c78e41f3e330d57ccee2a304d288278..c9754ea29997238d897cbc86e023eda7b1852677 100644 (file)
@@ -34,16 +34,16 @@ namespace System.Security.AccessControl {
        public sealed class SemaphoreAccessRule : AccessRule
        {
                public SemaphoreAccessRule (IdentityReference identity,
-                                           SemaphoreRights semaphoreRights,
+                                           SemaphoreRights eventRights,
                                            AccessControlType type)
-                       : base (identity, (int)semaphoreRights, false, InheritanceFlags.None, PropagationFlags.None, type)
+                       : base (identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, type)
                {
                }
 
                public SemaphoreAccessRule (string identity,
-                                           SemaphoreRights semaphoreRights,
+                                           SemaphoreRights eventRights,
                                            AccessControlType type)
-                       : this (new NTAccount (identity), semaphoreRights, type)
+                       : this (new NTAccount (identity), eventRights, type)
                {
                }
                
index 5680f0f7ed812f36303b1a560f9266acdda8ec09..acc495ce45d1508752dcdf4a1700a2c322c40131 100644 (file)
@@ -35,9 +35,9 @@ namespace System.Security.AccessControl {
                : AuditRule
        {
                public SemaphoreAuditRule (IdentityReference identity,
-                                          SemaphoreRights semaphoreRights,
+                                          SemaphoreRights eventRights,
                                           AuditFlags flags)
-                       : base (identity, (int)semaphoreRights, false, InheritanceFlags.None, PropagationFlags.None, flags)
+                       : base (identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, flags)
                {
                }
                
index 15de9f7b3cce674e63d8f7dd3a41c22ae2bbe0a0..192c9bd4d7516a27092e22ed6959429e07f826aa 100644 (file)
@@ -94,14 +94,14 @@ namespace System.Security.Cryptography.X509Certificates {
 
                // methods
 
-               public override void CopyFrom (AsnEncodedData encodedData)
+               public override void CopyFrom (AsnEncodedData asnEncodedData)
                {
-                       if (encodedData == null)
-                               throw new ArgumentNullException ("encodedData");
+                       if (asnEncodedData == null)
+                               throw new ArgumentNullException ("asnEncodedData");
 
-                       X509Extension ex = (encodedData as X509Extension);
+                       X509Extension ex = (asnEncodedData as X509Extension);
                        if (ex == null)
-                               throw new ArgumentException (Locale.GetText ("Wrong type."), "encodedData");
+                               throw new ArgumentException (Locale.GetText ("Wrong type."), "asnEncodedData");
 
                        if (ex._oid == null)
                                _oid = new Oid (oid, friendlyName);
index 89e7afb963c119867ef2340516653ac879ac7855..bf24e85f8c6ce674e451b0680a5ea6fc56b294d1 100644 (file)
@@ -159,14 +159,14 @@ namespace System.Security.Cryptography.X509Certificates {
 
                // methods
 
-               public override void CopyFrom (AsnEncodedData encodedData)
+               public override void CopyFrom (AsnEncodedData asnEncodedData)
                {
-                       if (encodedData == null)
-                               throw new ArgumentNullException ("encodedData");
+                       if (asnEncodedData == null)
+                               throw new ArgumentNullException ("asnEncodedData");
 
-                       X509Extension ex = (encodedData as X509Extension);
+                       X509Extension ex = (asnEncodedData as X509Extension);
                        if (ex == null)
-                               throw new ArgumentException (Locale.GetText ("Wrong type."), "encodedData");
+                               throw new ArgumentException (Locale.GetText ("Wrong type."), "asnEncodedData");
 
                        if (ex._oid == null)
                                _oid = new Oid (oid, friendlyName);
index 2ae31073e578abcc8593f01c833c7911ee7a5b2e..0fe01aaf102cd2c04b499ef4f1822e4da01a6955 100644 (file)
@@ -343,7 +343,6 @@ namespace MonoTests.System.IO.Compression
                        return new MemoryStream (Encoding.UTF8.GetBytes (s));
                }
 
-#if NET_4_5
                [Test]
                public void CheckNet45Overloads () // Xambug #21982
                {
@@ -361,7 +360,6 @@ namespace MonoTests.System.IO.Compression
                        decompressing.Close();
                        backing.Close();
                }
-#endif 
 
                [Test]
                [ExpectedException (typeof (ArgumentException))]
index a72ffc6ee05be349d7ef0ef6a5e06e2dfe08a483..47a740ca14ace19a3450a045a7720c6cabe83cf7 100644 (file)
@@ -303,7 +303,6 @@ namespace MonoTests.System.IO.Compression
                        return new MemoryStream (Encoding.UTF8.GetBytes (s));
                }
 
-#if NET_4_5
                [Test]
                public void CheckNet45Overloads () // Xambug #21982
                {
@@ -321,7 +320,6 @@ namespace MonoTests.System.IO.Compression
                        decompressing.Close();
                        backing.Close();
                }
-#endif
        }
 }
 
index 0638cb720b3a57d67b0879d93f72fce0a3bda685..4e7aa5668c35bc304532a5f6e14a716d069f1e72 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_5
 using System;
 using System.Net;
 using System.Threading;
@@ -297,4 +296,3 @@ namespace MonoTests.System.Net.WebSockets
        }
 }
 
-#endif
index b7097b5db56a7e930149f96f641b3df8997559a1..0d5763967b0d01256f3504a608fc899dfa65941e 100644 (file)
@@ -2482,7 +2482,6 @@ namespace MonoTests.System.Net
                        }
                }
 
-#if NET_4_5
                [Test]
                public void AllowReadStreamBuffering ()
                {
@@ -2494,7 +2493,6 @@ namespace MonoTests.System.Net
                        } catch (InvalidOperationException) {
                        }
                }
-#endif
 
                class ListenerScope : IDisposable {
                        EventWaitHandle completed;
index 9eb5877052ea3430303a703c1219ad5f73f81d1e..1a6c45179aa8f65d7fb4e63909010ca984332d54 100644 (file)
@@ -1781,7 +1781,6 @@ namespace MonoTests.System.Net
                        Assert.AreSame (wc.Proxy, WebRequest.DefaultWebProxy);
                }
                 
-#if NET_4_5
                [Test]
                [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void UploadStringAsyncCancelEvent ()
@@ -1873,7 +1872,6 @@ namespace MonoTests.System.Net
                        }
                        listener.Close ();
                }
-#endif
 
                public void UploadAsyncCancelEventTest (int port, Action<WebClient, Uri, EventWaitHandle> uploadAction)
                {
index aabaceb9f4a73cd4ce970c74d02e27f938686035..0b404581899f7cdd81bb2421c0ac1f5e537a022d 100644 (file)
@@ -26,7 +26,6 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_4_5
 using System;
 using System.IO;
 using System.Collections.Generic;
@@ -276,4 +275,3 @@ namespace MonoTests.System.Net
                }
        }
 }
-#endif
index 7d9d24052f3c985d4df6f82244ac578051a3e92b..308c3bdf39a36e865b54fcf35ee2ad3ab3ae9340 100644 (file)
@@ -62,11 +62,7 @@ namespace MonoTests.System {
                public void Setup()
                {
                        StringTester.CreateMode = createMode;
-#if NET_4_5
                        StringTester.Location = location + "NET_4_5";
-#else
-                       StringTester.Location = location + "NET_4_0";
-#endif
                }
 
                [TearDown]
index 32c3fb0459e10829d7a0b9419f3eb99dfc72cd72..6ebd708ee02c0ea845f317e30f6d1f58230f7a20 100644 (file)
@@ -836,11 +836,7 @@ namespace MonoTests.System
                {
                        Uri u = new Uri("http://localhost/index.asp#main#start", false);
 
-#if NET_4_5
                                Assert.AreEqual (u.Fragment, "#main#start", "#1");
-#else
-                               Assert.AreEqual (u.Fragment, "#main%23start", "#1");
-#endif
 
                        u = new Uri("http://localhost/index.asp#main#start", true);
                        Assert.AreEqual (u.Fragment, "#main#start", "#2");
@@ -849,11 +845,7 @@ namespace MonoTests.System
 
                        Uri b = new Uri ("http://www.gnome.org");
                        Uri n = new Uri (b, "blah#main#start");
-#if NET_4_5
                                Assert.AreEqual (n.Fragment, "#main#start", "#3");
-#else
-                               Assert.AreEqual (n.Fragment, "#main%23start", "#3");
-#endif
 
                        n = new Uri (b, "blah#main#start", true);
                        Assert.AreEqual (n.Fragment, "#main#start", "#4");
@@ -1071,13 +1063,8 @@ namespace MonoTests.System
                        Uri ftp = new Uri ("FTP://[::ffFF:169.32.14.5]/");
                        Assert.AreEqual ("ftp", ftp.Scheme, "#7");
 
-#if NET_4_5
                        Assert.AreEqual ("[::ffff:169.32.14.5]", ftp.Host, "#8");
                        Assert.AreEqual ("ftp://[::ffff:169.32.14.5]/", ftp.ToString (), "#9");
-#else
-                       Assert.AreEqual ("[0000:0000:0000:0000:0000:FFFF:A920:0E05]", ftp.Host, "#8");
-                       Assert.AreEqual ("ftp://[0000:0000:0000:0000:0000:FFFF:A920:0E05]/", ftp.ToString (), "#9");
-#endif
                }
 
                [Test]
@@ -1484,15 +1471,9 @@ namespace MonoTests.System
                        for (int i = 0; i < 128; i++)
                                sb.Append ((char) i);
 
-#if NET_4_5
                        Assert.AreEqual (
                                "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F",
                                Uri.EscapeDataString (sb.ToString ()));
-#else
-                       Assert.AreEqual (
-                               "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22%23%24%25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F",
-                               Uri.EscapeDataString (sb.ToString ()));
-#endif
 
                        Assert.AreEqual ("%C3%A1", Uri.EscapeDataString ("á"));
                }
@@ -1503,15 +1484,9 @@ namespace MonoTests.System
                        for (int i = 0; i < 128; i++)
                                sb.Append ((char) i);
 
-#if NET_4_5
                        Assert.AreEqual (
                                "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22#$%25&'()*+,-./0123456789:;%3C=%3E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[%5C]%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F",
                                Uri.EscapeUriString (sb.ToString ()));
-#else
-                       Assert.AreEqual (
-                               "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22#$%25&'()*+,-./0123456789:;%3C=%3E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F",
-                               Uri.EscapeUriString (sb.ToString ()));
-#endif
 
                        Assert.AreEqual ("%C3%A1", Uri.EscapeDataString ("á"));
                }
index 27553b18c7ea8bfcdab3acb52c447b299ed3c3ec..e8c5c0073b5c071bbb25b84b06776b5541b7d27a 100644 (file)
@@ -95,9 +95,6 @@ namespace System.Reflection.Emit
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private extern void setup_internal_class (TypeBuilder tb);
                
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               private extern void create_internal_class (TypeBuilder tb);
-               
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private extern void setup_generic_class ();
 
@@ -672,7 +669,6 @@ namespace System.Reflection.Emit
                                fields = new FieldBuilder [1];
                                fields [0] = res;
                                num_fields ++;
-                               create_internal_class (this);
                        }
 
                        if (IsEnum) {
index 548915c83a503ceb94dc38ad263a9753e85c147a..d7128abc33553234622f969754c0ffe932741ded 100644 (file)
@@ -422,16 +422,14 @@ namespace System.Runtime.InteropServices
 
                public static int GetHRForException (Exception e)
                {
+                       if (e == null) return 0;
+
 #if FEATURE_COMINTEROP
                        var errorInfo = new ManagedErrorInfo(e);
                        SetErrorInfo (0, errorInfo);
+#endif
 
                        return e._HResult;
-#elif FULL_AOT_RUNTIME
-                       throw new PlatformNotSupportedException ();
-#else                  
-                       return -1;
-#endif
                }
 
                [MonoTODO]
index b5d78b7571eb7790a9669ef86e28fd90d39d942e..d347fb619657593e29a14d7aba9cd91ccd61aa8e 100644 (file)
@@ -53,7 +53,6 @@ namespace MonoTests.System.Collections.Generic
                        }
                }
 
-#if NET_4_5
                [Test]
                public void Create ()
                {
@@ -70,7 +69,6 @@ namespace MonoTests.System.Collections.Generic
                        } catch (ArgumentNullException) {
                        }
                }
-#endif
 
                [Test]
                public void DefaultComparer_UserComparable ()
index 364a8b3f955944c029f0cfa67784d550a1643701..231b829c50947d22adcf4ea2a171ce85648ae8f3 100644 (file)
@@ -623,7 +623,6 @@ namespace MonoTests.System.Globalization
                        Assert.IsFalse (zh2.Equals (zh1), "#2");
                }
 
-#if NET_4_5
                CountdownEvent barrier = new CountdownEvent (3);
                AutoResetEvent[] evt = new AutoResetEvent [] { new AutoResetEvent (false), new AutoResetEvent (false), new AutoResetEvent (false), new AutoResetEvent (false)};
 
@@ -743,6 +742,5 @@ namespace MonoTests.System.Globalization
                        Assert.AreEqual ("$100,000.00", us_str, "#1");
                        Assert.AreEqual ("R$ 100.000,00", br_str, "#2");
                }
-#endif
        }
 }
index f552e933a65290eca43c3c6cd3ffa9df00148d7d..b7c472b4fdd8308a3f13fede8ce20f664ca38f6e 100644 (file)
@@ -17,9 +17,7 @@ using System.IO;
 using System.Runtime.Serialization.Formatters.Binary;
 using System.Text;
 using System.Threading;
-#if NET_4_5
 using System.Threading.Tasks;
-#endif
 
 using NUnit.Framework;
 
@@ -1119,7 +1117,6 @@ namespace MonoTests.System.IO
                        Assert.IsTrue (ms.DisposedCalled, "After");
                }
 
-#if NET_4_5
                [Test]
                public void ReadAsync ()
                {
@@ -1323,6 +1320,5 @@ namespace MonoTests.System.IO
                                return true;
                        }
                }
-#endif
        }
 }
index 54e5e04243583a489dff3547f3eb5d601d8d08fa..eb29cfa9e4b5f26aef1d9cc09feb0159f0396ba7 100644 (file)
@@ -9,9 +9,7 @@
 using System;
 using System.IO;
 using System.Text;
-#if NET_4_5
 using System.Threading.Tasks;
-#endif
 
 using NUnit.Framework;
 
@@ -845,7 +843,6 @@ public class StreamReaderTest
                Assert.AreEqual (0, StreamReader.Null.ReadBlock (buffer, 0, buffer.Length));
        }
 
-#if NET_4_5
        [Test]
        public void ReadLineAsync ()
        {
@@ -866,7 +863,6 @@ public class StreamReaderTest
                Assert.IsTrue (result.Wait (3000), "#1");
                Assert.AreEqual ("ab" + Environment.NewLine, result.Result);
        }
-#endif
 }
 
 class MyStream : Stream {
index e22a13736fd5c021a20570dea5c1ee1ab9a29486..a7ad4ea65e45d0a83d65324cf3895bd1209a6fa0 100644 (file)
@@ -120,7 +120,6 @@ namespace MonoTests.System.IO
                        Assert.IsFalse (s.CanRead, "#1");
                }
 
-#if NET_4_5
                [Test]
                public void CopyAsync ()
                {
@@ -211,6 +210,5 @@ namespace MonoTests.System.IO
                        } catch (AggregateException) {
                        }
                }
-#endif
        }
 }
index 661cffc18c61370723ed9b5137ce483534128833..a0afe231788c15e8fe1d95f9dbdf8e0681e60223 100644 (file)
@@ -1051,7 +1051,6 @@ namespace MonoTests.System.IO
                Assert.AreEqual (5, ms.Position, "#2");
        }
 
-#if NET_4_5
        [Test]
        public void FlushAsync ()
        {
@@ -1098,7 +1097,6 @@ namespace MonoTests.System.IO
                Assert.IsTrue (t.Wait (1000), "#5");
        }
 
-#endif
 
        // TODO - Write - test errors, functionality tested in TestFlush.
 }
index 4d8f1bf0ddace880834887a756e0b5f4aea2b91a..b707567f1de9e8bae42dce2492e7df4b572f5908 100644 (file)
@@ -1152,10 +1152,8 @@ public class AssemblyNameTest {
                Assert.IsNull (an.GetPublicKey (), "GetPublicKey");
                Assert.IsNull (an.GetPublicKeyToken (), "GetPublicKeyToken");
                Assert.AreEqual ("TestAssembly", an.ToString (), "ToString");
-#if NET_4_5
                Assert.IsNull (an.CultureName, "CultureName");
                Assert.AreEqual (AssemblyContentType.Default, an.ContentType, "ContentType");
-#endif
        }
 
        [Test] // ctor (String)
index 2914e0e26c0cbab9b383fded48271c45e5584ab3..e82d81fba6185798f6112b86a0afa64a57a67b96 100644 (file)
@@ -1277,7 +1277,6 @@ namespace MonoTests.System.Reflection
                        Assert.AreEqual (GetType().Assembly, a);
                }
 
-#if NET_4_5
                [Test]
                public void DefinedTypes_Equality ()
                {
@@ -1286,7 +1285,6 @@ namespace MonoTests.System.Reflection
 
                        Assert.AreSame (x1, x2, "#1");
                }
-#endif
 
                class MyAssembly : Assembly { }
 
index f16d9a2a0f22a6ca28ef676adbd626e68253139b..a2d0f7cfac42b34be0fc3dad3f25bcb4a54afd87 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Reflection;
@@ -54,4 +53,3 @@ namespace MonoTests.System.Reflection
        }
 }
 
-#endif
\ No newline at end of file
index 406b569c8d4245f3a43273294eab72e19425ecf5..fb2706d575b9753db0bc5597138d7baa07c910fb 100644 (file)
@@ -97,14 +97,12 @@ namespace MonoTests.System.Reflection
                        Assert.AreEqual (ParamEnum.Foo, info [5].DefaultValue, "#2");
                }
 
-#if NET_4_5
                [Test]
                public void HasDefaultValueEnum () {
                        ParameterInfo[] info = typeof (ParameterInfoTest).GetMethod ("paramMethod").GetParameters ();
 
                        Assert.IsTrue (info [5].HasDefaultValue);
                }
-#endif
 
                public static void Sample2 ([DecimalConstantAttribute(2,2,2,2,2)] decimal a, [DateTimeConstantAttribute(123456)] DateTime b) {}
 
@@ -125,7 +123,6 @@ namespace MonoTests.System.Reflection
                        Assert.AreEqual (pi [1].DefaultValue.GetType (), typeof (Missing), "#2");
                }
 
-#if NET_4_5
                [Test]
                public void TestHasDefaultValues ()
                {
@@ -135,7 +132,6 @@ namespace MonoTests.System.Reflection
                        Assert.IsFalse (pi [1].HasDefaultValue, "#2");
                        Assert.IsTrue (pi [2].HasDefaultValue, "#3");
                }
-#endif
 
                public void Sample (int a, [Optional] int b, object c = null)
                {
@@ -252,13 +248,11 @@ namespace MonoTests.System.Reflection
                        Assert.AreEqual (decimal.MaxValue, info [0].DefaultValue);
                }
 
-#if NET_4_5
                [Test]
                public void HasDefaultValueDecimal () {
                        var info = typeof (ParameterInfoTest).GetMethod ("TestC").GetParameters ();
                        Assert.IsTrue (info [0].HasDefaultValue);
                }
-#endif
 
                class TestParamAttribute : Attribute
                {
@@ -344,13 +338,11 @@ namespace MonoTests.System.Reflection
                        Assert.AreEqual (0, p.GetCustomAttributes (typeof (FlagsAttribute), false).Length, "#3");
                        Assert.AreEqual (0, p.GetOptionalCustomModifiers ().Length, "#4");
                        Assert.AreEqual (0, p.GetRequiredCustomModifiers ().Length, "#5");
-#if NET_4_5
                        try {
                                var ign = p.HasDefaultValue;
                                Assert.Fail ("#6");
                        } catch (NotImplementedException) {
                        }
-#endif
                        Assert.IsFalse (p.IsIn, "#7");
 #if FEATURE_USE_LCID
                        Assert.IsFalse (p.IsLcid, "#8");
@@ -358,13 +350,11 @@ namespace MonoTests.System.Reflection
                        Assert.IsFalse (p.IsOptional, "#9");
                        Assert.IsFalse (p.IsOut, "#10");
                        Assert.IsFalse (p.IsRetval, "#10");
-#if NET_4_5
                        try {
                                var ign = p.CustomAttributes;
                                Assert.Fail ("#11");
                        } catch (NotImplementedException) {
                        }
-#endif
                        try {
                                p.GetCustomAttributesData ();
                                Assert.Fail ("#12");
@@ -446,9 +436,7 @@ namespace MonoTests.System.Reflection
                        Assert.IsFalse (p2.IsIn, "#1");
                        p2.MyAttrsImpl = ParameterAttributes.In;
                        Assert.IsTrue (p2.IsIn, "#2");
-#if NET_4_5
                        Assert.AreEqual (p2.myList, p2.CustomAttributes, "#3");
-#endif
                }
        }
 }
index 5edb1274e33022cf25d0c464da4e3ad918d8689c..c442b3c7b890ee3eb27420618a8462692df7627a 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Threading;
@@ -117,4 +116,3 @@ namespace MonoTests.System.Runtime.CompilerServices
        }
 }
 
-#endif
\ No newline at end of file
index 57b1d2c27642c1dafc45d854a7ccf92f086f1cee..c9d7aca855bc8a1fa9eb64ccd193d34715fd6e38 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Threading;
@@ -396,4 +395,3 @@ namespace MonoTests.System.Runtime.CompilerServices
        }
 }
 
-#endif
index 31242816cd8b55d9d5da0746dcdabb52d4b5bdf7..867a06cabc57031a5ac00b9017a0f23d4d6605ab 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Threading;
@@ -173,4 +172,3 @@ namespace MonoTests.System.Runtime.CompilerServices
        }
 }
 
-#endif
\ No newline at end of file
index cc53f6a8d99a221337ae91ef80686c61ed619ceb..fbb1d821157a422ff8a4d63a007eadb5f45a24e7 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Collections.Generic;
@@ -183,4 +182,3 @@ namespace MonoTests.System.Runtime.CompilerServices
        }
 }
 
-#endif
\ No newline at end of file
index d0acc240428b4ada7b89cd9496e6b479b3dfabb7..094fb8a54811c8396c25b5bb393dac3ce62d5e42 100644 (file)
@@ -260,6 +260,15 @@ namespace MonoTests.System.Runtime.InteropServices
                        }
                }
 #endif
+
+               [Test]
+               public void GetHRForException ()
+               {
+                       Assert.AreEqual (0, Marshal.GetHRForException (null));
+                       Assert.IsTrue (Marshal.GetHRForException (new Exception ()) < 0);
+                       Assert.AreEqual (12345, Marshal.GetHRForException (new IOException ("test message", 12345)));
+               }
+
                [Test] // bug #319009
                public void StringToHGlobalUni ()
                {
@@ -298,9 +307,7 @@ namespace MonoTests.System.Runtime.InteropServices
                                Assert.AreEqual (0x1234, Marshal.ReadInt16 (ptr));
                                Assert.AreEqual (0x1234, Marshal.ReadInt16 (ptr, 0));
                                Assert.AreEqual (0x4567, Marshal.ReadInt16 (ptr, 2));
-#if NET_4_5
                                Assert.AreEqual (0x4567, Marshal.ReadInt16 ((ptr + 5)));
-#endif
                                Assert.AreEqual (0x4567, Marshal.ReadInt16 (ptr, 5));
                        } finally {
                                Marshal.FreeHGlobal (ptr);
@@ -318,9 +325,7 @@ namespace MonoTests.System.Runtime.InteropServices
                                Assert.AreEqual (0x12345678, Marshal.ReadInt32 (ptr));
                                Assert.AreEqual (0x12345678, Marshal.ReadInt32 (ptr, 0));
                                Assert.AreEqual (0x77654321, Marshal.ReadInt32 (ptr, 4));
-#if NET_4_5
                                Assert.AreEqual (0x77654321, Marshal.ReadInt32 ((ptr + 10)));
-#endif
                                Assert.AreEqual (0x77654321, Marshal.ReadInt32 (ptr, 10));
                        } finally {
                                Marshal.FreeHGlobal (ptr);
index 0456cbcdd1707db16c627b196432b2626e4802a3..7eb43817eb311f11680feeb44dce84573d5a9608 100644 (file)
@@ -2,7 +2,6 @@
 // ClaimsIdentityTest.cs - NUnit Test Cases for System.Security.Claims.ClaimsIdentity
 //
 
-#if NET_4_5
 
 using NUnit.Framework;
 using System;
@@ -561,4 +560,3 @@ namespace MonoTests.System.Security.Claims
        }
 }
 
-#endif
index 3d5660d256e1ac98a409781f6f12770c5c7699d3..35734b76b028457a567bbb64116eb04f65203060 100644 (file)
@@ -3,7 +3,6 @@
 // ClaimsPrincipalTest.cs - NUnit Test Cases for System.Security.Claims.ClaimsPrincipal
 //
 
-#if NET_4_5
 
 using NUnit.Framework;
 using System;
@@ -253,4 +252,3 @@ namespace MonoTests.System.Security.Claims
        }
 }
 
-#endif
index a02ffe96986af87a5e7c90d811c9f4f2d5b5fe40..264095d8b31bafd1cb5add47ca69b91397fe7d04 100644 (file)
@@ -24,7 +24,6 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
-#if NET_4_5
 
 using System;
 using System.Threading;
@@ -176,4 +175,3 @@ namespace MonoTests.System.Threading.Tasks
        }
 }
 
-#endif
\ No newline at end of file
index e0b127a0bc708543bfa39f3f3f6d7aa59c6e93ac..e406357204f2a99d07bae57065d386b59cede021 100644 (file)
@@ -409,7 +409,6 @@ namespace MonoTests.System.Threading.Tasks
                        Assert.IsTrue (tasks[1].IsCanceled, "#4");
                }
 
-#if NET_4_5            
                [Test]
                public void WaitAll_CancelledAndTimeout ()
                {
@@ -418,7 +417,6 @@ namespace MonoTests.System.Threading.Tasks
                        var t2 = Task.Delay (3000);
                        Assert.IsFalse (Task.WaitAll (new[] { t1, t2 }, 10));
                }
-#endif
 
                [Test]
                public void WaitAllExceptionThenCancelled ()
@@ -1219,7 +1217,6 @@ namespace MonoTests.System.Threading.Tasks
                        }
                }
 
-#if NET_4_5
                [Test]
                public void ContinuationOnBrokenScheduler ()
                {
@@ -2114,6 +2111,5 @@ namespace MonoTests.System.Threading.Tasks
                        }
                }
                
-#endif
        }
 }
index 3a80f5ae0d294e288b2c4785045290fb9bc149bc..f5b4dd9a3ba1d029449ab8125eaf508c6710cca2 100644 (file)
@@ -38,7 +38,6 @@ namespace MonoTests.System.Threading
        [TestFixture]
        public class CancellationTokenSourceTest
        {
-#if NET_4_5
 
                [Test]
                public void Ctor_Invalid ()
@@ -100,7 +99,6 @@ namespace MonoTests.System.Threading
                        Assert.AreEqual (0, called, "#1");
                }
 
-#endif
 
                [Test]
                public void Token ()
@@ -345,13 +343,11 @@ namespace MonoTests.System.Threading
                        } catch (ObjectDisposedException) {
                        }
 
-#if NET_4_5
                        try {
                                cts.CancelAfter (1);
                                Assert.Fail ("#6");
                        } catch (ObjectDisposedException) {
                        }
-#endif
                }
 
                [Test]
@@ -478,7 +474,6 @@ namespace MonoTests.System.Threading
                        }
                }
 
-#if NET_4_5
                [Test]
                public void DisposeRace ()
                {
@@ -490,7 +485,6 @@ namespace MonoTests.System.Threading
                                c1.Dispose ();
                        }
                }
-#endif
        }
 }
 
index 3743ea2b3072db737686c848c994d29e323b68e6..c3b37a99407bccce894b569ccb9265cb19a9579f 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
 
 using System;
 using System.Threading;
@@ -146,5 +145,4 @@ namespace MonoTests.System.Threading
        }
 }
 
-#endif
 
index 28588f8e008664c9ee0dc501fa0ae6e27db06dec..7fa93e8fcf1d628928fea25b2df5360d21751f54 100644 (file)
@@ -156,7 +156,6 @@ namespace MonoTests.System
                        Assert.AreEqual (myArrSeg_1 != myArrSeg_2, true);
                }
 
-#if NET_4_5
                [Test]
                public void IList_NotSupported ()
                {
@@ -278,6 +277,5 @@ namespace MonoTests.System
                        IList<byte> seg = new ArraySegment<byte> (arr);
                        seg[4] = 3;
                }
-#endif
        }
 }
index 1d9f1a10bc689454df138a2256dc41e9c338aaa8..93676f9dd091647595efdf15b49b50b16660ac50 100644 (file)
@@ -332,7 +332,6 @@ public class ConsoleTest
 
 #if !MOBILE
 
-#if NET_4_5
        [Test]
        public void RedirectedTest ()
        {
@@ -343,7 +342,6 @@ public class ConsoleTest
                Console.SetError (TextWriter.Null);
                Assert.IsFalse (Console.IsErrorRedirected);
        }
-#endif
 
        // Bug 678357
        [Test]
index 717a99b6e1cba9263ce50e2ee00abdde649a65d3..b94afe1013da0b7ef3ceb012df27cb8d1875932d 100644 (file)
@@ -124,7 +124,6 @@ namespace MonoTests.System {
                        Assert.IsFalse (Foo.failed);
                }
 
-#if NET_4_5
                [Test]
                public void WeakReferenceT_TryGetTarget_NullTarget ()
                {
@@ -132,7 +131,6 @@ namespace MonoTests.System {
                        object obj;
                        Assert.IsFalse (r.TryGetTarget (out obj), "#1");
                }
-#endif
        }
 }
 
index 19db1acb0a4349d5cb97d4570cb503ae31171d69..aeff48d0040ee4f94ed3c598c732c98e7f01ce2d 100644 (file)
@@ -155,9 +155,7 @@ namespace System.Threading
             lockID = Interlocked.Increment(ref s_nextLockID);
         }
 
-#if NET_4_5
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-#endif
         private static bool IsRWEntryEmpty(ReaderWriterCount rwc)
         {
             if (rwc.lockID == 0)
@@ -181,9 +179,7 @@ namespace System.Threading
         /// entry for this thread, but doesn't want to add one if an existing one
         /// could not be found.
         /// </summary>
-#if NET_4_5
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
-#endif
         private ReaderWriterCount GetThreadRWCount(bool dontAllocate)
         {
                        ReaderWriterCount rwc = t_rwc;
@@ -1117,9 +1113,7 @@ namespace System.Threading
             return owners & READER_MASK;
         }
 
-#if NET_4_5
                [MethodImpl(MethodImplOptions.AggressiveInlining)]
-#endif
         private void EnterMyLock()
         {
             if (Interlocked.CompareExchange(ref myLock, 1, 0) != 0)
diff --git a/mcs/errors/cs0246-36.cs b/mcs/errors/cs0246-36.cs
new file mode 100644 (file)
index 0000000..2bd3567
--- /dev/null
@@ -0,0 +1,9 @@
+// CS0246: The type or namespace name `Foo' could not be found. Are you missing an assembly reference?
+// Line: 8
+
+class Crashy
+{
+       void Call (System.Action<object> action) { }
+
+       public void DoCrash () => Call (f => f as Foo);
+}
index 02ae36b34c16802d921a2476f4a1ab3d750052c3..2a9aa97fed0e62be46728b7c4dccb871de0ff0cc 100644 (file)
@@ -2362,6 +2362,11 @@ namespace Mono.CSharp
                        eclass = ExprClass.Value;
                        TypeSpec etype = expr.Type;
 
+                       if (type == null) {
+                               type = InternalType.ErrorType;
+                               return this;
+                       }
+
                        if (!TypeSpec.IsReferenceType (type) && !type.IsNullableType) {
                                if (TypeManager.IsGenericParameter (type)) {
                                        ec.Report.Error (413, loc,
index ad08d02b5db754d3948bdb8ad9c4b690011c1aff..d7105592ebb29cdcff8b38039e88696def303f62 100644 (file)
@@ -6002,7 +6002,7 @@ namespace Mono.CSharp {
                                ec.EmitInt (first_resume_pc);
                                ec.Emit (OpCodes.Sub);
 
-                               var labels = new Label[resume_points.Count - System.Math.Max (first_catch_resume_pc, 0)];
+                               var labels = new Label [first_catch_resume_pc > 0 ? first_catch_resume_pc : resume_points.Count];
                                for (int i = 0; i < labels.Length; ++i)
                                        labels[i] = resume_points[i].PrepareForEmit (ec);
                                ec.Emit (OpCodes.Switch, labels);
diff --git a/mcs/tests/test-async-88.cs b/mcs/tests/test-async-88.cs
new file mode 100644 (file)
index 0000000..813d51d
--- /dev/null
@@ -0,0 +1,28 @@
+using System;
+using System.Threading.Tasks;
+
+public class Test
+{
+       static async Task<string> AsyncWithDeepTry ()
+       {
+               try {
+                       await Task.Yield ();
+
+                       try {
+                               await Task.Yield ();
+                       } catch {
+                       }
+               } catch {
+                       await Task.Yield ();
+               } finally {
+               }
+
+               return null;
+       }
+
+
+       static void Main ()
+       {
+               AsyncWithDeepTry ().Wait ();
+       }
+}
index a95de56e90c17e519bd041af1030ecd6cab58c3e..270fe53c92fdf6c81740a9b9d4f6d632b8673bd4 100644 (file)
       </method>
     </type>
   </test>
+  <test name="test-async-88.cs">
+    <type name="Test">
+      <method name="System.Threading.Tasks.Task`1[System.String] AsyncWithDeepTry()" attrs="145">
+        <size>33</size>
+      </method>
+      <method name="Void Main()" attrs="145">
+        <size>12</size>
+      </method>
+      <method name="Void .ctor()" attrs="6278">
+        <size>7</size>
+      </method>
+    </type>
+    <type name="Test+&lt;AsyncWithDeepTry&gt;c__async0">
+      <method name="Void MoveNext()" attrs="486">
+        <size>460</size>
+      </method>
+      <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+        <size>13</size>
+      </method>
+    </type>
+  </test>
   <test name="test-cls-00.cs">
     <type name="CLSCLass_6">
       <method name="Void add_Disposed(Delegate)" attrs="2182">
index 0e665fe7f5b0149ad30c17a21bec4e1ce8d54405..7636c2b204f4e6ed8cfc300f30bbe2ccca2e6268 100644 (file)
@@ -1089,9 +1089,12 @@ namespace CorCompare
                        if (!(memberDefenition is MethodDefinition))
                                return;
 
-                       MethodDefinition mbase = (MethodDefinition) memberDefenition;
+                       MethodDefinition mbase = (MethodDefinition)memberDefenition;
+
+                       ParameterData parms = new ParameterData (writer, mbase.Parameters) {
+                               HasExtensionParameter = mbase.CustomAttributes.Any (l => l.AttributeType.FullName == "System.Runtime.CompilerServices.ExtensionAttribute")
+                       };
 
-                       ParameterData parms = new ParameterData (writer, mbase.Parameters);
                        parms.DoOutput ();
 
                        MemberData.OutputGenericParameters (writer, mbase);
@@ -1137,8 +1140,11 @@ namespace CorCompare
                        this.parameters = parameters;
                }
 
+               public bool HasExtensionParameter { get; set; }
+
                public override void DoOutput ()
                {
+                       bool first = true;
                        writer.WriteStartElement ("parameters");
                        foreach (ParameterDefinition parameter in parameters) {
                                writer.WriteStartElement ("parameter");
@@ -1146,7 +1152,8 @@ namespace CorCompare
                                AddAttribute ("position", parameter.Method.Parameters.IndexOf(parameter).ToString(CultureInfo.InvariantCulture));
                                AddAttribute ("attrib", ((int) parameter.Attributes).ToString());
 
-                               string direction = "in";
+                               string direction = first && HasExtensionParameter ? "this" : "in";
+                               first = false;
 
                                if (parameter.ParameterType is ByReferenceType)
                                        direction = parameter.IsOut ? "out" : "ref";
index e99f07415765bc21b618798f6d7c132a22d0a1e1..2acb5ca3f5ac98c5c743ea4235ce938a46b4ecb9 100644 (file)
@@ -342,10 +342,19 @@ namespace Xamarin.ApiDiff {
                                if (i > 0)
                                        change.Append (", ");
 
+                               string mods_tgt = tgt [i].GetAttribute ("direction") ?? "";
+                               string mods_src = src [i].GetAttribute ("direction") ?? "";
+
+                               if (mods_tgt.Length > 0)
+                                       mods_tgt = mods_tgt + " ";
+
+                               if (mods_src.Length > 0)
+                                       mods_src = mods_src + " ";
+
                                if (i >= srcCount) {
-                                       change.AppendAdded (tgt [i].GetTypeName ("type") + " " + tgt [i].GetAttribute ("name"), true);
+                                       change.AppendAdded (mods_tgt + tgt [i].GetTypeName ("type") + " " + tgt [i].GetAttribute ("name"), true);
                                } else if (i >= tgtCount) {
-                                       change.AppendRemoved (src [i].GetTypeName ("type") + " " + src [i].GetAttribute ("name"), true);
+                                       change.AppendRemoved (mods_src + src [i].GetTypeName ("type") + " " + src [i].GetAttribute ("name"), true);
                                } else {
                                        var paramSourceType = src [i].GetTypeName ("type");
                                        var paramTargetType = tgt [i].GetTypeName ("type");
@@ -353,6 +362,12 @@ namespace Xamarin.ApiDiff {
                                        var paramSourceName = src [i].GetAttribute ("name");
                                        var paramTargetName = tgt [i].GetAttribute ("name");
 
+                                       if (mods_src != mods_tgt) {
+                                               change.AppendModified (mods_src, mods_tgt, true);
+                                       } else {
+                                               change.Append (mods_src);
+                                       }
+
                                        if (paramSourceType != paramTargetType) {
                                                change.AppendModified (paramSourceType, paramTargetType, true);
                                        } else {
@@ -360,7 +375,7 @@ namespace Xamarin.ApiDiff {
                                        }
                                        change.Append (" ");
                                        if (paramSourceName != paramTargetName) {
-                                               change.AppendModified (paramSourceName, paramTargetName, false);
+                                               change.AppendModified (paramSourceName, paramTargetName, true);
                                        } else {
                                                change.Append (paramSourceName);
                                        }
index 469bfdb57d59b2cb1fe2610c18111cfae3183368..846e34757b04076f355b7369a47b7ffcf274a34d 100644 (file)
@@ -1916,5 +1916,9 @@ mono_gchandle_free_domain (MonoDomain *domain)
        }
 
 }
-
+#else
+       #ifdef _MSC_VER
+               // Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+               void __mono_win32_boehm_gc_quiet_lnk4221(void) {}
+       #endif
 #endif /* no Boehm GC */
index f51c979a50fab8ab5d230010e483867b188a7ed5..de54bd07a4d97ebde27235f64988583de477ac8b 100644 (file)
@@ -529,8 +529,9 @@ struct _MonoMethodInflated {
 struct _MonoGenericClass {
        MonoClass *container_class;     /* the generic type definition */
        MonoGenericContext context;     /* a context that contains the type instantiation doesn't contain any method instantiation */ /* FIXME: Only the class_inst member of "context" is ever used, so this field could be replaced with just a monogenericinst */
-       guint is_dynamic  : 1;          /* We're a MonoDynamicGenericClass */
+       guint is_dynamic  : 1;          /* Contains dynamic types */
        guint is_tb_open  : 1;          /* This is the fully open instantiation for a type_builder. Quite ugly, but it's temporary.*/
+       guint need_sync   : 1;      /* Only if dynamic. Need to be synchronized with its container class after its finished. */
        MonoClass *cached_class;        /* if present, the MonoClass corresponding to the instantiation.  */
 
        /* 
@@ -541,21 +542,6 @@ struct _MonoGenericClass {
        MonoImageSet *owner;
 };
 
-/*
- * This is used when instantiating a generic type definition which is
- * a TypeBuilder.
- */
-struct _MonoDynamicGenericClass {
-       MonoGenericClass generic_class;
-       int count_fields;
-       MonoClassField *fields;
-       guint initialized;
-       /* The non-inflated types of the fields */
-       MonoType **field_generic_types;
-       /* The managed objects representing the fields */
-       MonoObject **field_objects;
-};
-
 /*
  * A type parameter.
  */
index f095a5c11c92fcdb21bbd406bb60d8903cffa5d3..863af471cc5be1ba1c74bed44cc4a96a496c259f 100644 (file)
@@ -530,8 +530,7 @@ ICALL(ASSEMN_2, "get_public_token", mono_digest_get_public_token)
 ICALL_TYPE(CATTR_DATA, "System.Reflection.CustomAttributeData", CATTR_DATA_1)
 ICALL(CATTR_DATA_1, "ResolveArgumentsInternal", ves_icall_System_Reflection_CustomAttributeData_ResolveArgumentsInternal)
 
-ICALL_TYPE(ASSEMB, "System.Reflection.Emit.AssemblyBuilder", ASSEMB_1)
-ICALL(ASSEMB_1, "InternalAddModule", ves_icall_AssemblyBuilder_InternalAddModule)
+ICALL_TYPE(ASSEMB, "System.Reflection.Emit.AssemblyBuilder", ASSEMB_2)
 ICALL(ASSEMB_2, "basic_init", ves_icall_AssemblyBuilder_basic_init)
 
 #ifndef DISABLE_REFLECTION_EMIT
@@ -574,7 +573,6 @@ ICALL(SYMBOLTYPE_1, "create_unmanaged_type", ves_icall_SymbolType_create_unmanag
 
 ICALL_TYPE(TYPEB, "System.Reflection.Emit.TypeBuilder", TYPEB_1)
 ICALL(TYPEB_1, "create_generic_class", ves_icall_TypeBuilder_create_generic_class)
-ICALL(TYPEB_2, "create_internal_class", ves_icall_TypeBuilder_create_internal_class)
 ICALL(TYPEB_3, "create_runtime_class", ves_icall_TypeBuilder_create_runtime_class)
 ICALL(TYPEB_4, "get_IsGenericParameter", ves_icall_TypeBuilder_get_IsGenericParameter)
 ICALL(TYPEB_5, "get_event_info", ves_icall_TypeBuilder_get_event_info)
index f0d2bca6ed49d12a513f5356d770a9790b2e53f3..66f7d6b560d084cac2f07ffc20249e62b699c8f9 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "lock-tracer.h"
 
-
 /*
  * This is a very simple lock trace implementation. It can be used to verify that the runtime is
  * correctly following all locking rules.
@@ -141,5 +140,9 @@ mono_locks_lock_released (RuntimeLocks kind, gpointer lock)
 {
        add_record (RECORD_LOCK_RELEASED, kind, lock);
 }
-
-#endif
+#else
+       #ifdef _MSC_VER
+               // Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+               void __mono_win32_lock_tracer_quiet_lnk4221(void) {}
+       #endif
+#endif /* LOCK_TRACER */
index 169053473317eaa14429f11eca6f97143c264554..27115ccc9c1b1e384c9245ff8e976882159a9ed1 100644 (file)
@@ -2806,8 +2806,6 @@ static void
 free_generic_class (MonoGenericClass *gclass)
 {
        /* The gclass itself is allocated from the image set mempool */
-       if (gclass->is_dynamic)
-               mono_reflection_free_dynamic_generic_class (gclass);
        if (gclass->cached_class && gclass->cached_class->interface_id)
                mono_unload_interface_id (gclass->cached_class);
 }
@@ -2984,13 +2982,9 @@ mono_metadata_lookup_generic_class (MonoClass *container_class, MonoGenericInst
                return gclass;
        }
 
-       if (is_dynamic) {
-               MonoDynamicGenericClass *dgclass = mono_image_set_new0 (set, MonoDynamicGenericClass, 1);
-               gclass = &dgclass->generic_class;
+       gclass = mono_image_set_new0 (set, MonoGenericClass, 1);
+       if (is_dynamic)
                gclass->is_dynamic = 1;
-       } else {
-               gclass = mono_image_set_new0 (set, MonoGenericClass, 1);
-       }
 
        gclass->is_tb_open = is_tb_open;
        gclass->container_class = container_class;
index 9c5f47d7eb3278ebc6624c20c1c6b38c237a173c..046491943d5e7d5493b9a225d2a28f7e275162c5 100644 (file)
@@ -284,7 +284,6 @@ typedef struct {
 typedef struct _MonoType MonoType;
 typedef struct _MonoGenericInst MonoGenericInst;
 typedef struct _MonoGenericClass MonoGenericClass;
-typedef struct _MonoDynamicGenericClass MonoDynamicGenericClass;
 typedef struct _MonoGenericContext MonoGenericContext;
 typedef struct _MonoGenericContainer MonoGenericContainer;
 typedef struct _MonoGenericParam MonoGenericParam;
index c1a531c0dc87eac782c46785a481b82df532abc6..47d7dc5b1decdcde5b5cec33b24527f639ddc41d 100644 (file)
@@ -551,5 +551,9 @@ mono_gc_is_null (void)
 {
        return TRUE;
 }
-
-#endif
+#else
+       #ifdef _MSC_VER
+               // Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+               void __mono_win32_null_gc_quiet_lnk4221(void) {}
+       #endif
+#endif /* HAVE_NULL_GC */
index b20706400b24353e614f587a0054533e57af704c..1f114033b5f5275b87c2a9a0bf9d78215827c7bb 100644 (file)
@@ -1329,7 +1329,6 @@ typedef struct {
 } CattrNamedArg;
 
 gboolean          mono_image_create_pefile (MonoReflectionModuleBuilder *module, HANDLE file, MonoError *error);
-MonoReflectionModule * mono_image_load_module_dynamic (MonoReflectionAssemblyBuilder *assembly, MonoString *file_name, MonoError *error);
 guint32       mono_image_insert_string (MonoReflectionModuleBuilder *module, MonoString *str);
 guint32       mono_image_create_token  (MonoDynamicImage *assembly, MonoObject *obj, gboolean create_methodspec, gboolean register_token, MonoError *error);
 guint32       mono_image_create_method_token (MonoDynamicImage *assembly, MonoObject *obj, MonoArray *opt_param_types, MonoError *error);
@@ -1340,9 +1339,6 @@ void          mono_dynamic_image_release_gc_roots (MonoDynamicImage *image);
 
 void        mono_reflection_setup_internal_class  (MonoReflectionTypeBuilder *tb);
 
-void
-ves_icall_TypeBuilder_create_internal_class (MonoReflectionTypeBuilder *tb);
-
 void
 ves_icall_TypeBuilder_setup_generic_class (MonoReflectionTypeBuilder *tb);
 
@@ -1396,9 +1392,6 @@ ves_icall_System_Reflection_CustomAttributeData_ResolveArgumentsInternal (MonoRe
 MonoType*
 mono_reflection_type_get_handle (MonoReflectionType *ref, MonoError *error);
 
-void
-mono_reflection_free_dynamic_generic_class (MonoGenericClass *gclass);
-
 gboolean
 mono_image_build_metadata (MonoReflectionModuleBuilder *module, MonoError *error);
 
index 69f78fb6900813420d02305fab71e4b7855f922e..66d02568805aac1477b5e536463ce890e973083f 100644 (file)
@@ -700,24 +700,14 @@ mono_field_get_object_checked (MonoDomain *domain, MonoClass *klass, MonoClassFi
        res->field = field;
        MONO_OBJECT_SETREF (res, name, mono_string_new (domain, mono_field_get_name (field)));
 
-       if (mono_is_sr_field_on_inst (field)) {
-               res->attrs = mono_reflection_get_field_on_inst_generic_type (field)->attrs;
-
+       if (field->type) {
                rt = mono_type_get_object_checked (domain, field->type, error);
                if (!mono_error_ok (error))
                        return NULL;
 
                MONO_OBJECT_SETREF (res, type, rt);
-       } else {
-               if (field->type) {
-                       rt = mono_type_get_object_checked (domain, field->type, error);
-                       if (!mono_error_ok (error))
-                               return NULL;
-
-                       MONO_OBJECT_SETREF (res, type, rt);
-               }
-               res->attrs = mono_field_get_flags (field);
        }
+       res->attrs = mono_field_get_flags (field);
        CACHE_OBJECT (MonoReflectionField *, field, res, klass);
 }
 
@@ -2172,18 +2162,6 @@ mono_reflection_get_token_checked (MonoObject *obj, MonoError *error)
        } else if (strcmp (klass->name, "MonoField") == 0) {
                MonoReflectionField *f = (MonoReflectionField*)obj;
 
-               if (mono_is_sr_field_on_inst (f->field)) {
-                       MonoDynamicGenericClass *dgclass = (MonoDynamicGenericClass*)f->field->parent->generic_class;
-
-                       if (f->field >= dgclass->fields && f->field < dgclass->fields + dgclass->count_fields) {
-                               int field_index = f->field - dgclass->fields;
-                               MonoObject *obj;
-
-                               g_assert (field_index >= 0 && field_index < dgclass->count_fields);
-                               obj = dgclass->field_objects [field_index];
-                               return mono_reflection_get_token_checked (obj, error);
-                       }
-               }
                token = mono_class_get_field_token (f->field);
        } else if (strcmp (klass->name, "MonoProperty") == 0) {
                MonoReflectionProperty *p = (MonoReflectionProperty*)obj;
index 90c8266b341f7749da66d0ae7d3fab1a6ebbffcc..32bab7ebcb8655cc6adf94c918beb880ce7a8a72 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include "config.h"
+
 #ifdef HAVE_SGEN_GC
 
 
@@ -65,6 +66,10 @@ mono_gc_get_restart_signal (void)
 {
        return -1;
 }
-
-#endif
+#else
+       #ifdef _MSC_VER
+               // Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+               void __mono_win32_sgen_os_coop_quiet_lnk4221(void) {}
+       #endif
+#endif /* USE_COOP_GC */
 #endif
index c66208a5aa38950fc6a3afb31c35785a3fdd920b..26e01d91db9f6378af083dd2483dcdcd45a4e5ba 100644 (file)
@@ -68,9 +68,6 @@ mono_is_sre_ctor_builder (MonoClass *klass);
 gboolean
 mono_is_sre_ctor_on_tb_inst (MonoClass *klass);
 
-gboolean
-mono_is_sr_field_on_inst (MonoClassField *field);
-
 gboolean
 mono_is_sr_mono_cmethod (MonoClass *klass);
 
@@ -83,9 +80,6 @@ mono_reflection_create_generic_class (MonoReflectionTypeBuilder *tb, MonoError *
 MonoMethod*
 mono_reflection_method_builder_to_mono_method (MonoReflectionMethodBuilder *mb, MonoError *error);
 
-MonoType*
-mono_reflection_get_field_on_inst_generic_type (MonoClassField *field);
-
 MonoMethod*
 mono_reflection_method_on_tb_inst_get_handle (MonoReflectionMethodOnTypeBuilderInst *m, MonoError *error);
 
index 78a11c8fc00c9d3e7f7b311df6184fc0970b7097..ff2f93a767be1a8ef630b34a058a2fa076a48db5 100644 (file)
@@ -1749,8 +1749,6 @@ fixup_method (MonoReflectionILGen *ilgen, gpointer value, MonoDynamicImage *asse
                        } else if (!strcmp (iltoken->member->vtable->klass->name, "FieldBuilder")) {
                                continue;
                        } else if (!strcmp (iltoken->member->vtable->klass->name, "MonoField")) {
-                               MonoClassField *f = ((MonoReflectionField*)iltoken->member)->field;
-                               g_assert (mono_is_sr_field_on_inst (f));
                                continue;
                        } else if (!strcmp (iltoken->member->vtable->klass->name, "MethodBuilder") ||
                                        !strcmp (iltoken->member->vtable->klass->name, "ConstructorBuilder")) {
index cf03f8d766c02520b998a2854fd31af6d2f11bab..50ec350fe9c337db5c25bcf6e892bf8fee17f129 100644 (file)
@@ -942,69 +942,9 @@ mono_image_get_ctorbuilder_token (MonoDynamicImage *assembly, MonoReflectionCtor
 static gboolean
 is_field_on_inst (MonoClassField *field)
 {
-       return (field->parent->generic_class && field->parent->generic_class->is_dynamic && ((MonoDynamicGenericClass*)field->parent->generic_class)->fields);
+       return field->parent->generic_class && field->parent->generic_class->is_dynamic;
 }
 
-/*
- * If FIELD is a field of a MonoDynamicGenericClass, return its non-inflated type.
- */
-static MonoType*
-get_field_on_inst_generic_type (MonoClassField *field)
-{
-       MonoClass *klass, *gtd;
-       MonoDynamicGenericClass *dgclass;
-       int field_index;
-
-       g_assert (is_field_on_inst (field));
-
-       dgclass = (MonoDynamicGenericClass*)field->parent->generic_class;
-
-       if (field >= dgclass->fields && field - dgclass->fields < dgclass->count_fields) {
-               field_index = field - dgclass->fields;
-               return dgclass->field_generic_types [field_index];              
-       }
-
-       klass = field->parent;
-       gtd = klass->generic_class->container_class;
-
-       if (field >= klass->fields && field - klass->fields < klass->field.count) {
-               field_index = field - klass->fields;
-               return gtd->fields [field_index].type;
-       }
-
-       g_assert_not_reached ();
-       return 0;
-}
-
-#ifndef DISABLE_REFLECTION_EMIT
-gboolean
-mono_is_sr_field_on_inst (MonoClassField *field)
-{
-       return is_field_on_inst (field);
-}
-#else
-gboolean
-mono_is_sr_field_on_inst (MonoClassField *field)
-{
-       return FALSE;
-}
-#endif /*DISABLE_REFLECTION_EMIT*/
-
-#ifndef DISABLE_REFLECTION_EMIT
-MonoType*
-mono_reflection_get_field_on_inst_generic_type (MonoClassField *field)
-{
-       return get_field_on_inst_generic_type (field);
-}
-#else
-MonoType*
-mono_reflection_get_field_on_inst_generic_type (MonoClassField *field)
-{
-       g_assert_not_reached ();
-       return NULL;
-}
-#endif /* DISABLE_REFLECTION_EMIT */
-
 #ifndef DISABLE_REFLECTION_EMIT
 static guint32
 mono_image_get_fieldref_token (MonoDynamicImage *assembly, MonoObject *f, MonoClassField *field)
@@ -1023,10 +963,7 @@ mono_image_get_fieldref_token (MonoDynamicImage *assembly, MonoObject *f, MonoCl
                int index = field - field->parent->fields;
                type = mono_field_get_type (&field->parent->generic_class->container_class->fields [index]);
        } else {
-               if (is_field_on_inst (field))
-                       type = get_field_on_inst_generic_type (field);
-               else
-                       type = mono_field_get_type (field);
+               type = mono_field_get_type (field);
        }
        token = mono_image_get_memberref_token (assembly, &field->parent->byval_arg,
                                                                                        mono_field_get_name (field),
@@ -2030,68 +1967,6 @@ mono_reflection_dynimage_basic_init (MonoReflectionAssemblyBuilder *assemblyb)
 
 #endif /* !DISABLE_REFLECTION_EMIT */
 
-#ifndef DISABLE_REFLECTION_EMIT
-
-MonoReflectionModule *
-mono_image_load_module_dynamic (MonoReflectionAssemblyBuilder *ab, MonoString *fileName, MonoError *error)
-{
-       char *name;
-       MonoImage *image;
-       MonoImageOpenStatus status;
-       MonoDynamicAssembly *assembly;
-       guint32 module_count;
-       MonoImage **new_modules;
-       gboolean *new_modules_loaded;
-       
-       mono_error_init (error);
-       
-       name = mono_string_to_utf8_checked (fileName, error);
-       return_val_if_nok (error, NULL);
-
-       image = mono_image_open (name, &status);
-       if (!image) {
-               if (status == MONO_IMAGE_ERROR_ERRNO)
-                       mono_error_set_exception_instance (error, mono_get_exception_file_not_found (fileName));
-               else
-                       mono_error_set_bad_image_name (error, name, NULL);
-               g_free (name);
-               return NULL;
-       }
-
-       g_free (name);
-
-       assembly = ab->dynamic_assembly;
-       image->assembly = (MonoAssembly*)assembly;
-
-       module_count = image->assembly->image->module_count;
-       new_modules = g_new0 (MonoImage *, module_count + 1);
-       new_modules_loaded = g_new0 (gboolean, module_count + 1);
-
-       if (image->assembly->image->modules)
-               memcpy (new_modules, image->assembly->image->modules, module_count * sizeof (MonoImage *));
-       if (image->assembly->image->modules_loaded)
-               memcpy (new_modules_loaded, image->assembly->image->modules_loaded, module_count * sizeof (gboolean));
-       new_modules [module_count] = image;
-       new_modules_loaded [module_count] = TRUE;
-       mono_image_addref (image);
-
-       g_free (image->assembly->image->modules);
-       image->assembly->image->modules = new_modules;
-       image->assembly->image->modules_loaded = new_modules_loaded;
-       image->assembly->image->module_count ++;
-
-       mono_assembly_load_references (image, &status);
-       if (status) {
-               mono_image_close (image);
-               mono_error_set_exception_instance (error, mono_get_exception_file_not_found (fileName));
-               return NULL;
-       }
-
-       return mono_module_get_object_checked (mono_domain_get (), image, error);
-}
-
-#endif /* DISABLE_REFLECTION_EMIT */
-
 #ifndef DISABLE_REFLECTION_EMIT
 static gpointer
 register_assembly (MonoDomain *domain, MonoReflectionAssembly *res, MonoAssembly *assembly)
@@ -3289,85 +3164,6 @@ mono_reflection_create_generic_class (MonoReflectionTypeBuilder *tb, MonoError *
        return TRUE;
 }
 
-/**
- * reflection_create_internal_class:
- * @tb: a TypeBuilder object
- * @error: set on error
- *
- * Actually create the MonoClass that is associated with the TypeBuilder.
- * On success returns TRUE, on failure returns FALSE and sets @error.
- *
- */
-static gboolean
-reflection_create_internal_class (MonoReflectionTypeBuilder *tb, MonoError *error)
-{
-       MonoClass *klass;
-
-       mono_error_init (error);
-       klass = mono_class_from_mono_type (tb->type.type);
-
-       mono_loader_lock ();
-       if (klass->enumtype && mono_class_enum_basetype (klass) == NULL) {
-               MonoReflectionFieldBuilder *fb;
-               MonoClass *ec;
-               MonoType *enum_basetype;
-
-               g_assert (tb->fields != NULL);
-               g_assert (mono_array_length (tb->fields) >= 1);
-
-               fb = mono_array_get (tb->fields, MonoReflectionFieldBuilder*, 0);
-
-               MonoType *field_type = mono_reflection_type_get_handle ((MonoReflectionType*)fb->type, error);
-               if (!is_ok (error)) {
-                       mono_loader_unlock ();
-                       return FALSE;
-               }
-               if (!mono_type_is_valid_enum_basetype (field_type)) {
-                       mono_loader_unlock ();
-                       return TRUE;
-               }
-
-               enum_basetype = mono_reflection_type_get_handle ((MonoReflectionType*)fb->type, error);
-               if (!is_ok (error)) {
-                       mono_loader_unlock ();
-                       return FALSE;
-               }
-               klass->element_class = mono_class_from_mono_type (enum_basetype);
-               if (!klass->element_class)
-                       klass->element_class = mono_class_from_mono_type (enum_basetype);
-
-               /*
-                * get the element_class from the current corlib.
-                */
-               ec = default_class_from_mono_type (enum_basetype);
-               klass->instance_size = ec->instance_size;
-               klass->size_inited = 1;
-               /* 
-                * this is almost safe to do with enums and it's needed to be able
-                * to create objects of the enum type (for use in SetConstant).
-                */
-               /* FIXME: Does this mean enums can't have method overrides ? */
-               mono_class_setup_vtable_general (klass, NULL, 0, NULL);
-       }
-       mono_loader_unlock ();
-       return TRUE;
-}
-
-/**
- * ves_icall_TypeBuilder_create_internal_class:
- * @tb: a TypeBuilder object
- *
- * (icall)
- * Actually create the MonoClass that is associated with the TypeBuilder.
- */
-void
-ves_icall_TypeBuilder_create_internal_class (MonoReflectionTypeBuilder *tb)
-{
-       MonoError error;
-       (void) reflection_create_internal_class (tb, &error);
-       mono_error_set_pending_exception (&error);
-}
-
 static MonoMarshalSpec*
 mono_marshal_spec_from_builder (MonoImage *image, MonoAssembly *assembly,
                                MonoReflectionMarshal *minfo, MonoError *error)
@@ -3954,107 +3750,46 @@ inflate_method (MonoReflectionType *type, MonoObject *obj, MonoError *error)
        return inflate_mono_method (mono_class_from_mono_type (t), method, obj);
 }
 
-/*TODO avoid saving custom attrs for generic classes as it's enough to have them on the generic type definition.*/
-static gboolean
-reflection_generic_class_initialize (MonoReflectionGenericClass *type, MonoArray *fields, MonoError *error)
+static void
+reflection_generic_class_initialize (MonoReflectionGenericClass *type, MonoError *error)
 {
        MonoGenericClass *gclass;
-       MonoDynamicGenericClass *dgclass;
        MonoClass *klass, *gklass;
        MonoType *gtype;
-       int i;
 
        mono_error_init (error);
 
        gtype = mono_reflection_type_get_handle ((MonoReflectionType*)type, error);
-       return_val_if_nok (error, FALSE);
+       return_if_nok (error);
        klass = mono_class_from_mono_type (gtype);
        g_assert (gtype->type == MONO_TYPE_GENERICINST);
        gclass = gtype->data.generic_class;
 
        if (!gclass->is_dynamic)
-               return TRUE;
-
-       dgclass = (MonoDynamicGenericClass *) gclass;
-
-       if (dgclass->initialized)
-               return TRUE;
+               return;
 
        gklass = gclass->container_class;
        mono_class_init (gklass);
 
-       dgclass->count_fields = fields ? mono_array_length (fields) : 0;
-
-       dgclass->fields = mono_image_set_new0 (gclass->owner, MonoClassField, dgclass->count_fields);
-       dgclass->field_objects = mono_image_set_new0 (gclass->owner, MonoObject*, dgclass->count_fields);
-       dgclass->field_generic_types = mono_image_set_new0 (gclass->owner, MonoType*, dgclass->count_fields);
-
-       for (i = 0; i < dgclass->count_fields; i++) {
-               MonoObject *obj = (MonoObject *)mono_array_get (fields, gpointer, i);
-               MonoClassField *field, *inflated_field = NULL;
-
-               if (!strcmp (obj->vtable->klass->name, "FieldBuilder")) {
-                       inflated_field = field = fieldbuilder_to_mono_class_field (klass, (MonoReflectionFieldBuilder *) obj, error);
-                       return_val_if_nok (error, FALSE);
-               } else if (!strcmp (obj->vtable->klass->name, "MonoField"))
-                       field = ((MonoReflectionField *) obj)->field;
-               else {
-                       field = NULL; /* prevent compiler warning */
-                       g_assert_not_reached ();
-               }
-
-               dgclass->fields [i] = *field;
-               dgclass->fields [i].parent = klass;
-               dgclass->fields [i].type = mono_class_inflate_generic_type_checked (
-                       field->type, mono_generic_class_get_context ((MonoGenericClass *) dgclass), error);
-               mono_error_assert_ok (error); /* FIXME don't swallow the error */
-               dgclass->field_generic_types [i] = field->type;
-               MONO_GC_REGISTER_ROOT_IF_MOVING (dgclass->field_objects [i], MONO_ROOT_SOURCE_REFLECTION, "dynamic generic class field object");
-               dgclass->field_objects [i] = obj;
-
-               if (inflated_field) {
-                       g_free (inflated_field);
-               } else {
-                       dgclass->fields [i].name = mono_image_set_strdup (gclass->owner, dgclass->fields [i].name);
-               }
-       }
-
-       dgclass->initialized = TRUE;
-       return TRUE;
+       /* Mark this as needing synchronization with its generic container */
+       gclass->need_sync = TRUE;
 }
 
 void
 mono_reflection_generic_class_initialize (MonoReflectionGenericClass *type, MonoArray *fields)
 {
        MonoError error;
-       (void) reflection_generic_class_initialize (type, fields, &error);
+       reflection_generic_class_initialize (type, &error);
        mono_error_set_pending_exception (&error);
 }
 
-void
-mono_reflection_free_dynamic_generic_class (MonoGenericClass *gclass)
-{
-       MonoDynamicGenericClass *dgclass;
-       int i;
-
-       g_assert (gclass->is_dynamic);
-
-       dgclass = (MonoDynamicGenericClass *)gclass;
-
-       for (i = 0; i < dgclass->count_fields; ++i) {
-               MonoClassField *field = dgclass->fields + i;
-               mono_metadata_free_type (field->type);
-               MONO_GC_UNREGISTER_ROOT_IF_MOVING (dgclass->field_objects [i]);
-       }
-}
-
 /**
  * fix_partial_generic_class:
  * @klass: a generic instantiation MonoClass
  * @error: set on error
  *
  * Assumes that the generic container of @klass has its vtable
- * initialized, and updates the parent class, insterfaces, methods and
+ * initialized, and updates the parent class, interfaces, methods and
  * fields of @klass by inflating the types using the generic context.
  *
  * On success returns TRUE, on failure returns FALSE and sets @error.
@@ -4064,7 +3799,6 @@ static gboolean
 fix_partial_generic_class (MonoClass *klass, MonoError *error)
 {
        MonoClass *gklass = klass->generic_class->container_class;
-       MonoDynamicGenericClass *dgclass;
        int i;
 
        mono_error_init (error);
@@ -4072,7 +3806,6 @@ fix_partial_generic_class (MonoClass *klass, MonoError *error)
        if (klass->wastypebuilder)
                return TRUE;
 
-       dgclass = (MonoDynamicGenericClass *)  klass->generic_class;
        if (klass->parent != gklass->parent) {
                MonoType *parent_type = mono_class_inflate_generic_type_checked (&gklass->parent->byval_arg, &klass->generic_class->context, error);
                if (mono_error_ok (error)) {
@@ -4090,7 +3823,7 @@ fix_partial_generic_class (MonoClass *klass, MonoError *error)
                }
        }
 
-       if (!dgclass->initialized)
+       if (!klass->generic_class->need_sync)
                return TRUE;
 
        if (klass->method.count != gklass->method.count) {
@@ -5570,13 +5303,6 @@ mono_image_module_basic_init (MonoReflectionModuleBuilder *moduleb)
        g_assert_not_reached ();
 }
 
-MonoReflectionModule *
-mono_image_load_module_dynamic (MonoReflectionAssemblyBuilder *ab, MonoString *fileName, MonoError *error)
-{
-       g_assert_not_reached ();
-       return NULL;
-}
-
 guint32
 mono_image_insert_string (MonoReflectionModuleBuilder *module, MonoString *str)
 {
@@ -5647,12 +5373,6 @@ mono_reflection_type_get_handle (MonoReflectionType* ref, MonoError *error)
        return ref->type;
 }
 
-void
-mono_reflection_free_dynamic_generic_class (MonoGenericClass *gclass)
-{
-       g_assert_not_reached ();
-}
-
 #endif /* DISABLE_REFLECTION_EMIT */
 
 #ifndef DISABLE_REFLECTION_EMIT
@@ -5736,15 +5456,6 @@ ves_icall_ModuleBuilder_GetRegisteredToken (MonoReflectionModuleBuilder *mb, gui
        return obj;
 }
 
-MonoReflectionModule*
-ves_icall_AssemblyBuilder_InternalAddModule (MonoReflectionAssemblyBuilder *ab, MonoString *fileName)
-{
-       MonoError error;
-       MonoReflectionModule *result = mono_image_load_module_dynamic (ab, fileName, &error);
-       mono_error_set_pending_exception (&error);
-       return result;
-}
-
 /**
  * ves_icall_TypeBuilder_create_generic_class:
  * @tb: a TypeBuilder object
index d9dc57ab4f65ad6c0154794572f8f28257817078..6870f431e8b802c73647b150c39fdee3a1083416 100644 (file)
@@ -1005,7 +1005,6 @@ mono_thread_attach_full (MonoDomain *domain, gboolean force_attach)
        MonoThreadInfo *info;
        MonoInternalThread *thread;
        MonoThread *current_thread;
-       HANDLE thread_handle;
        MonoNativeThreadId tid;
 
        if ((thread = mono_thread_internal_current ())) {
@@ -1019,21 +1018,17 @@ mono_thread_attach_full (MonoDomain *domain, gboolean force_attach)
                g_error ("Thread %"G_GSIZE_FORMAT" calling into managed code is not registered with the GC. On UNIX, this can be fixed by #include-ing <gc.h> before <pthread.h> in the file containing the thread creation code.", mono_native_thread_id_get ());
        }
 
-       thread = create_internal_thread ();
-
-       thread_handle = mono_thread_info_open_handle ();
-       g_assert (thread_handle);
+       info = mono_thread_info_current ();
 
        tid=mono_native_thread_id_get ();
 
-       thread->handle = thread_handle;
+       thread = create_internal_thread ();
+       thread->handle = mono_thread_info_get_handle (info);
        thread->tid = MONO_NATIVE_THREAD_ID_TO_UINT (tid);
        thread->stack_ptr = &tid;
 
-       THREAD_DEBUG (g_message ("%s: Attached thread ID %"G_GSIZE_FORMAT" (handle %p)", __func__, tid, thread_handle));
+       THREAD_DEBUG (g_message ("%s: Attached thread ID %"G_GSIZE_FORMAT" (handle %p)", __func__, tid, thread->handle));
 
-       info = mono_thread_info_current ();
-       g_assert (info);
        thread->thread_info = info;
        thread->small_id = info->small_id;
 
index e82a6b3c41c3ea72d430ad7326e604000e35e3aa..62e771c78b912a21c14142bccfcf772d1b1fde9e 100755 (executable)
@@ -842,7 +842,6 @@ CLEANFILES= $(BUILT_SOURCES) *.exe *.dll
 EXTRA_DIST = TestDriver.cs \
        TestHelpers.cs \
        genmdesc.pl                             \
-       emitnunit.pl                    \
        $(test_sources)                         \
        $(x86_sources) cpu-x86.md               \
        $(amd64_sources) cpu-amd64.md           \
index ebab8ae4b25519a818acf6fc04a10b53de9004c8..82e3672ae1dee2f7b56abf3141204e2d2dbe844c 100644 (file)
@@ -191,7 +191,9 @@ handle_instruction:
                        case OP_LOADU4_MEMBASE:
                        case OP_LOADI1_MEMBASE:
                        case OP_LOADI8_MEMBASE:
+#ifndef MONO_ARCH_SOFT_FLOAT_FALLBACK
                        case OP_LOADR4_MEMBASE:
+#endif
                        case OP_LOADR8_MEMBASE:
                                if (ins->inst_offset != 0)
                                        continue;
@@ -211,7 +213,9 @@ handle_instruction:
                        case OP_STOREI2_MEMBASE_REG:
                        case OP_STOREI4_MEMBASE_REG:
                        case OP_STOREI8_MEMBASE_REG:
+#ifndef MONO_ARCH_SOFT_FLOAT_FALLBACK
                        case OP_STORER4_MEMBASE_REG:
+#endif
                        case OP_STORER8_MEMBASE_REG:
                        case OP_STOREV_MEMBASE:
                                if (ins->inst_offset != 0)
index afa3a7dd0af38706cfa39638829ec6a420e9fc0b..e1849862a847f604f88fb5d933a2637796ee209c 100644 (file)
@@ -3908,7 +3908,8 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
                }
        }
 
-       if (!(is_llvm_code (amodule, code) && (amodule->info.flags & MONO_AOT_FILE_FLAG_LLVM_ONLY))) {
+       if (!(is_llvm_code (amodule, code) && (amodule->info.flags & MONO_AOT_FILE_FLAG_LLVM_ONLY)) ||
+               (mono_llvm_only && method && method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED)) {
                res = init_method (amodule, method_index, method, NULL, NULL, error);
                if (!res)
                        goto cleanup;
index 0409cd7d78d0b20f7c73f59982a985442802ecfa..a883e70ee8915fc5301082d289ab5e15c3a412d0 100644 (file)
@@ -1889,6 +1889,13 @@ mono_local_emulate_ops (MonoCompile *cfg)
                        int op_noimm = mono_op_imm_to_op (ins->opcode);
                        MonoJitICallInfo *info;
 
+                       /*
+                        * These opcodes don't have logical equivalence to the emulating native
+                        * function. They are decomposed in specific fashion in mono_decompose_soft_float.
+                        */
+                       if (MONO_HAS_CUSTOM_EMULATION (ins))
+                               continue;
+
                        /*
                         * Emulation can't handle _IMM ops. If this is an imm opcode we need
                         * to check whether its non-imm counterpart is emulated and, if so,
index 1f9ffcf5d467b12f6b2ad89fdeadc57725db4b7d..82059df3c3e79582f23118a4d31d22ce688687af 100644 (file)
@@ -1,6 +1,7 @@
 #include <config.h>
 #include <fcntl.h>
 #include <mono/metadata/assembly.h>
+#include <mono/metadata/mono-config.h>
 #include <mono/utils/mono-mmap.h>
 #include "mini.h"
 
@@ -104,12 +105,14 @@ probe_embedded (const char *program, int *ref_argc, char **ref_argv [])
                        char *aname = g_strdup (config);
                        aname [strlen(aname)-strlen(".config")] = 0;
                        mono_register_config_for_assembly (aname, config);
-               } else if (strncmp (kind, "system_config:", strlen ("system_config:")) == 0){
-                       printf ("TODO s-Found: %s %llx\n", kind, (long long)offset);
+               } else if (strncmp (kind, "systemconfig:", strlen ("systemconfig:")) == 0){
+                       mono_config_parse_memory (kind + strlen ("systemconfig:"));
                } else if (strncmp (kind, "options:", strlen ("options:")) == 0){
                        mono_parse_options_from (kind + strlen("options:"), ref_argc, ref_argv);
                } else if (strncmp (kind, "config_dir:", strlen ("config_dir:")) == 0){
-                       printf ("TODO Found: %s %llx\n", kind, (long long)offset);
+                       mono_set_dirs (getenv ("MONO_PATH"), kind + strlen ("config_dir:"));
+               } else if (strncmp (kind, "machineconfig:", strlen ("machineconfig:")) == 0) {
+                       mono_register_machine_config (kind + strlen ("machineconfig:"));
                } else {
                        fprintf (stderr, "Unknown stream on embedded package: %s\n", kind);
                        exit (1);
index 258b265e063cc4f986c7e5b5a7c9bfa47a1e82af..5a662802771d12efd3ba67f4087f63585654f876 100644 (file)
@@ -402,6 +402,10 @@ collect_field_info_nested (MonoClass *klass, StructFieldInfo *fields, int index,
                                                                                                                           info->fields [i].mspec,
                                                                                                                           &align, TRUE, unicode);
                                fields [index].offset = offset + info->fields [i].offset;
+                               if (i == info->num_fields - 1 && fields [index].size + fields [index].offset < info->native_size) {
+                                       /* This can happen with .pack directives eg. 'fixed' arrays */
+                                       fields [index].size = info->native_size - fields [index].offset;
+                               }
                                index ++;
                        }
                }
index 61f3730f520383cefbc8fb9fc89b5d279f097cf4..d2ae0a74c372d5d486ade5b7f780bb903374dd4b 100644 (file)
@@ -7241,7 +7241,11 @@ emit_method_inner (EmitContext *ctx)
                ctx->module->max_method_idx = MAX (ctx->module->max_method_idx, cfg->method_index);
 
                // FIXME: beforefieldinit
-               if (ctx->has_got_access || mono_class_get_cctor (cfg->method->klass)) {
+               /*
+                * NATIVE_TO_MANAGED methods might be called on a thread not attached to the runtime, so they are initialized when loaded
+                * in load_method ().
+                */
+               if ((ctx->has_got_access || mono_class_get_cctor (cfg->method->klass)) && !(cfg->method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED)) {
                        /*
                         * linkonce methods shouldn't have initialization,
                         * because they might belong to assemblies which
index 5d66853ece98745dcfe334f57c49d357517159d9..6e461b806b461d133a7ecd56912a48c49d441354 100644 (file)
@@ -406,6 +406,13 @@ mono_class_is_magic_float (MonoClass *klass)
 
        if (strcmp ("nfloat", klass->name) == 0) {
                magic_nfloat_class = klass;
+
+               /* Assert that we are using the matching assembly */
+               MonoClassField *value_field = mono_class_get_field_from_name (klass, "v");
+               g_assert (value_field);
+               MonoType *t = mono_field_get_type (value_field);
+               g_assert (t->type == mini_native_type_replace_type (&klass->byval_arg)->type);
+
                return TRUE;
        }
        return FALSE;
index 2f0259cdcb2aff3a82f190daa8fbac1999892e64..845162f76f7349228657010d253c8dbfbae09b4f 100644 (file)
@@ -490,6 +490,7 @@ enum {
 
 #define MONO_IS_SETCC(ins) ((((ins)->opcode >= OP_CEQ) && ((ins)->opcode <= OP_CLT_UN)) || (((ins)->opcode >= OP_ICEQ) && ((ins)->opcode <= OP_ICLE_UN)) || (((ins)->opcode >= OP_LCEQ) && ((ins)->opcode <= OP_LCLT_UN)) || (((ins)->opcode >= OP_FCEQ) && ((ins)->opcode <= OP_FCLT_UN)))
 
+#define MONO_HAS_CUSTOM_EMULATION(ins) (((ins)->opcode >= OP_FBEQ && (ins)->opcode <= OP_FBLT_UN) || ((ins)->opcode >= OP_FCEQ && (ins)->opcode <= OP_FCLT_UN))
 
 #define MONO_IS_LOAD_MEMBASE(ins) (((ins)->opcode >= OP_LOAD_MEMBASE && (ins)->opcode <= OP_LOADV_MEMBASE) || ((ins)->opcode >= OP_ATOMIC_LOAD_I1 && (ins)->opcode <= OP_ATOMIC_LOAD_R8))
 #define MONO_IS_STORE_MEMBASE(ins) (((ins)->opcode >= OP_STORE_MEMBASE_REG && (ins)->opcode <= OP_STOREV_MEMBASE) || ((ins)->opcode >= OP_ATOMIC_STORE_I1 && (ins)->opcode <= OP_ATOMIC_STORE_R8))
index 8f1cef273f40075165310ad858c344b9fb71324f..62529ecc557579f80dd442a8da3fcac7ca42ca1e 100644 (file)
@@ -7220,3 +7220,12 @@ mono_return_double_array4 (double_array4 sa4, int addend) {
        return sa4;
 }
 
+typedef struct {
+       int array [3];
+} FixedArrayStruct;
+
+LIBTEST_API int STDCALL
+mono_test_marshal_fixed_array (FixedArrayStruct s)
+{
+       return s.array [0] + s.array [1] + s.array [2];
+}
index 9b80f969d65eeebb526c3f90e46a2a32f90d6f95..e170ba441ab44b5f9b32da5c914faac2a80d437d 100644 (file)
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
 using System.Reflection.Emit;
 
-public class Tests {
+public unsafe class Tests {
 
        public int int_field;
 
@@ -1904,5 +1904,23 @@ public class Tests {
                else
                        return 0;
        }
+
+    [StructLayout(LayoutKind.Explicit, Size = 12)]
+       public struct FixedArrayStruct {
+        [FieldOffset(0)]
+        public fixed int array[3];
+       }
+
+       [DllImport ("libtest", EntryPoint="mono_test_marshal_fixed_array")]
+       public static extern int mono_test_marshal_fixed_array (FixedArrayStruct s);
+
+       public static unsafe int test_6_fixed_array_struct () {
+               var s = new FixedArrayStruct ();
+               s.array [0] = 1;
+               s.array [1] = 2;
+               s.array [2] = 3;
+
+               return mono_test_marshal_fixed_array (s);
+       }
 }
 
index d8982e946aafaeb4d0048be10650abcfe36cd32b..60f5585e1823dbb35454d0a5197cc0886d02efc0 100644 (file)
@@ -263,20 +263,6 @@ mono_threads_platform_unregister (MonoThreadInfo *info)
        mono_threads_platform_set_exited (info);
 }
 
-HANDLE
-mono_threads_platform_open_handle (void)
-{
-       MonoThreadInfo *info;
-
-       info = mono_thread_info_current ();
-       g_assert (info);
-       g_assert (info->handle);
-
-       mono_w32handle_ref (info->handle);
-
-       return info->handle;
-}
-
 int
 mono_threads_get_max_stack_size (void)
 {
index 6c33743cfb63af5e231414c0698bab14c1233154..f66e6936b6dc1df123ab5060db34eb65a74ef86f 100644 (file)
@@ -322,24 +322,6 @@ mono_threads_platform_unregister (MonoThreadInfo *info)
 {
 }
 
-HANDLE
-mono_threads_platform_open_handle (void)
-{
-       HANDLE thread_handle;
-
-       thread_handle = GetCurrentThread ();
-       g_assert (thread_handle);
-
-       /*
-        * The handle returned by GetCurrentThread () is a pseudo handle, so it can't be used to
-        * refer to the thread from other threads for things like aborting.
-        */
-       DuplicateHandle (GetCurrentProcess (), thread_handle, GetCurrentProcess (), &thread_handle,
-                                        THREAD_ALL_ACCESS, TRUE, 0);
-
-       return thread_handle;
-}
-
 int
 mono_threads_get_max_stack_size (void)
 {
index 456bb97ea9d5f6f9fe0a1803230d8540e58d7457..5add7fe0f86f32f82803d805762bd4d865e4d78e 100644 (file)
@@ -1352,19 +1352,6 @@ mono_thread_info_exit (void)
        mono_threads_platform_exit (0);
 }
 
-/*
- * mono_thread_info_open_handle:
- *
- *   Return a io-layer/win32 handle for the current thread.
- * The handle need to be closed by calling CloseHandle () when it is no
- * longer needed.
- */
-HANDLE
-mono_thread_info_open_handle (void)
-{
-       return mono_threads_platform_open_handle ();
-}
-
 /*
  * mono_threads_open_thread_handle:
  *
index 15841081f675511cb87ae1b5e35a542c11070f7b..96e197980a05fce513369c12755c83b74a836c9d 100644 (file)
@@ -434,9 +434,6 @@ mono_thread_info_tls_set (THREAD_INFO_TYPE *info, MonoTlsKey key, gpointer value
 void
 mono_thread_info_exit (void);
 
-HANDLE
-mono_thread_info_open_handle (void);
-
 void
 mono_thread_info_set_exited (THREAD_INFO_TYPE *info);
 
@@ -543,7 +540,6 @@ void mono_threads_platform_resume_created (THREAD_INFO_TYPE *info, MonoNativeThr
 void mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize);
 gboolean mono_threads_platform_yield (void);
 void mono_threads_platform_exit (int exit_code);
-HANDLE mono_threads_platform_open_handle (void);
 HANDLE mono_threads_platform_open_thread_handle (HANDLE handle, MonoNativeThreadId tid);
 void mono_threads_platform_set_exited (THREAD_INFO_TYPE *info);
 void mono_threads_platform_describe (THREAD_INFO_TYPE *info, GString *text);
index 0c9876be062ce5de5d66c6f383466cf82da6572a..41f6439154b8065c50523f175f48f0c55c97835b 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>\r
+<?xml version="1.0" encoding="utf-8"?>\r
 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
@@ -80,6 +80,7 @@
     <ClCompile Include="..\mono\metadata\mono-security.c" />\r
     <ClCompile Include="..\mono\metadata\seq-points-data.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-mono.c" />\r
+    <ClCompile Include="..\mono\metadata\sgen-os-coop.c" />\r
     <ClCompile Include="..\mono\metadata\threadpool-ms-io.c" />\r
     <ClCompile Include="..\mono\metadata\threadpool-ms.c" />\r
     <ClCompile Include="..\mono\metadata\sgen-bridge.c" />\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
-</Project>\r
+</Project>
\ No newline at end of file
index e7d4b4110f5afa7abcbf9ed4fa9876ae1a803193..13f50fb2be4cdd5171a246f051f07b3b60db1da9 100644 (file)
     <ClCompile Include="..\mono\metadata\metadata-cross-helpers.c">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\custom-attrs.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\dynamic-image.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\dynamic-stream.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sre.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sre-encode.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sre-save.c">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
+    <ClCompile Include="..\mono\metadata\sgen-os-coop.c">\r
+      <Filter>Source Files\sgen</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="..\mono\metadata\appdomain.h">\r
     <ClInclude Include="..\mono\metadata\gc-internals.h">\r
       <Filter>Header Files\gc</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\custom-attrs-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\dynamic-image-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\dynamic-stream-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\reflection-cache.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\reflection-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\mono\metadata\sre-internals.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Filter Include="Header Files">\r